Browse Source

- Fixed the char table having party/guild_id as smallint when they need int there. Thanks to hermematon for pointing it out (use svn_ugprade7580.sql)
- Applied k3dt fixes to pet-hatching, ice-wall check, and wedding skills.
- Fixed endow skills calling the skill no damage packet twice.
- Fixed a crash on warpwaitingpc when the chat-room is empty.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7580 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex 19 years ago
parent
commit
5251ce7944
6 changed files with 20 additions and 8 deletions
  1. 8 0
      Changelog-Trunk.txt
  2. 2 2
      sql-files/main.sql
  3. 2 0
      sql-files/upgrade_svn7580.sql
  4. 1 1
      src/map/pet.c
  5. 4 2
      src/map/script.c
  6. 3 3
      src/map/skill.c

+ 8 - 0
Changelog-Trunk.txt

@@ -3,6 +3,14 @@ Date	Added
 AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
+2006/07/08
+	* Fixed the char table having party/guild_id as smallint when they need int
+	  there. Thanks to hermematon for pointing it out (use svn_ugprade7580.sql)
+	  [Skotlex]
+	* Applied k3dt fixes to pet-hatching, ice-wall check, and wedding skills.
+	  [Skotlex]
+	* Fixed endow skills calling the skill no damage packet twice. [Skotlex]
+	* Fixed a crash on warpwaitingpc when the chat-room is empty. [Skotlex]
 2006/07/07
 	* Fixed the Warm Skills [Skotlex]
 	* Removed the debug message when a player logs out and is removed from

+ 2 - 2
sql-files/main.sql

@@ -54,8 +54,8 @@ CREATE TABLE `char` (
   `option` int(11) NOT NULL default '0',
   `karma` tinyint(3) NOT NULL default '0',
   `manner` tinyint(3) NOT NULL default '0',
-  `party_id` smallint(11) unsigned NOT NULL default '0',
-  `guild_id` smallint(11) unsigned NOT NULL default '0',
+  `party_id` int(11) unsigned NOT NULL default '0',
+  `guild_id` int(11) unsigned NOT NULL default '0',
   `pet_id` int(11) unsigned NOT NULL default '0',
   `hair` tinyint(4) unsigned NOT NULL default '0',
   `hair_color` smallint(5) unsigned NOT NULL default '0',

+ 2 - 0
sql-files/upgrade_svn7580.sql

@@ -0,0 +1,2 @@
+ALTER TABLE `char` MODIFY `party_id` int(11) unsigned NOT NULL default '0';
+ALTER TABLE `char` MODIFY `guild_id` int(11) unsigned NOT NULL default '0';

+ 1 - 1
src/map/pet.c

@@ -502,7 +502,7 @@ int pet_recv_petdata(int account_id,struct s_pet *p,int flag)
 			clif_spawn(&sd->pd->bl);
 			clif_send_petdata(sd,0,0);
 			clif_send_petdata(sd,5,battle_config.pet_hair_style);
-//			clif_pet_equip(sd->pd);
+			clif_pet_equip(sd->pd);
 			clif_send_petstatus(sd);
 		}
 	}

+ 4 - 2
src/map/script.c

@@ -6804,6 +6804,7 @@ int buildin_warpwaitingpc(struct script_state *st)
 	char *str;
 	struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
 	struct chat_data *cd;
+	struct map_session_data *sd;
 
 	if(nd==NULL || (cd=(struct chat_data *)map_id2bl(nd->chat_id))==NULL )
 		return 0;
@@ -6817,8 +6818,9 @@ int buildin_warpwaitingpc(struct script_state *st)
 		n=conv_num(st,& (st->stack->stack_data[st->start+5]));
 
 	for(i=0;i<n;i++){
-		struct map_session_data *sd=cd->usersd[0];	// リスト先頭のPCを次々に。
-
+		sd=cd->usersd[0];
+		if (!sd) continue; //Broken npc chat room?
+		
 		mapreg_setreg(add_str((unsigned char *) "$@warpwaitingpc")+(i<<24),sd->bl.id);
 
 		if(strcmp(str,"Random")==0)

+ 3 - 3
src/map/skill.c

@@ -906,6 +906,7 @@ int skillnotok (int skillid, struct map_session_data *sd)
 				clif_skill_fail(sd,skillid,0,0);
 				return 1;
 			}
+			break;
 		case GD_EMERGENCYCALL:
 			if (!battle_config.emergency_call ||
 				(map[sd->bl.m].flag.nowarpto && battle_config.emergency_call&1))
@@ -3554,7 +3555,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 				sd && sd != dstsd)
 				clif_displaymessage(sd->fd,"You broke target's weapon");
 		}
-		clif_skill_nodamage(src,bl,skillid,skilllv,i);
 		break;
 
 	case PR_ASPERSIO:		/* アスペルシオ */
@@ -4909,14 +4909,14 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 	case WE_MALE:
 		{
 			int hp_rate=(skilllv <= 0)? 0:skill_db[skillid].hp_rate[skilllv-1];
-			int gain_hp= sstatus->max_hp*abs(hp_rate)/100; // The earned is the same % of the target HP than it costed the caster. [Skotlex]
+			int gain_hp= tstatus->max_hp*abs(hp_rate)/100; // The earned is the same % of the target HP than it costed the caster. [Skotlex]
 			clif_skill_nodamage(src,bl,skillid,status_heal(bl, gain_hp, 0, 0),1);
 		}
 		break;
 	case WE_FEMALE:
 		{
 			int sp_rate=(skilllv <= 0)? 0:skill_db[skillid].sp_rate[skilllv-1];
-			int gain_sp=sstatus->max_sp*abs(sp_rate)/100;// The earned is the same % of the target SP than it costed the caster. [Skotlex]
+			int gain_sp=tstatus->max_sp*abs(sp_rate)/100;// The earned is the same % of the target SP than it costed the caster. [Skotlex]
 			clif_skill_nodamage(src,bl,skillid,status_heal(bl, 0, gain_sp, 0),1);
 		}
 		break;