Переглянути джерело

- Fixed mob-skill event "skillused" not triggering at all.
- Summoned mobs will only be removed from a map if their master is also removed (dynamic mobs)
- Minor cleanups


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

skotlex 18 роки тому
батько
коміт
d6711d07b9
5 змінених файлів з 9 додано та 6 видалено
  1. 4 0
      Changelog-Trunk.txt
  2. 0 1
      src/map/atcommand.c
  3. 2 2
      src/map/mob.c
  4. 2 2
      src/map/party.c
  5. 1 1
      src/map/pc.c

+ 4 - 0
Changelog-Trunk.txt

@@ -3,6 +3,10 @@ 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/10/27
+	* Fixed mob-skill event "skillused" not triggering at all. [Skotlex]
+	* Summoned mobs will only be removed from a map if their master is also
+	  removed (dynamic mobs) [Skotlex]
 2006/10/26
 	* Updated sql files [Playtester]
 	* Experimental tweak to npc_parse_function - Overwrite existing functions. [Lance]

+ 0 - 1
src/map/atcommand.c

@@ -642,7 +642,6 @@ static AtCommandInfo atcommand_info[] = {
 	{ AtCommand_HomTalk,			"@homtalk",		0, atcommand_homtalk },
 	{ AtCommand_HomInfo,			"@hominfo",		0, atcommand_hominfo },
 	{ AtCommand_ShowMobs,			"@showmobs",		10, atcommand_showmobs },  //KarLaeda
-
 // add new commands before this line
 	{ AtCommand_Unknown,			NULL,				 1, NULL }
 };

+ 2 - 2
src/map/mob.c

@@ -2472,7 +2472,7 @@ int mob_summonslave(struct mob_data *md2,int *value,int amount,int skill_id)
 			continue;
 		
 		md= mob_spawn_dataset(&data);
-		md->special_state.cached= battle_config.dynamic_mobs;	//[Skotlex]
+		md->special_state.cached= md2->special_state.cached;	//[Skotlex]
 		if(skill_id == NPC_SUMMONSLAVE){
 			md->master_id=md2->bl.id;
 			md->state.killer = md2->state.killer;
@@ -2671,7 +2671,7 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event)
 		flag = (event == ms[i].cond1);
 		//Avoid entering on defined events to avoid "hyper-active skill use" due to the overflow of calls to this function
 		//in battle. The only exception is MSC_SKILLUSED which explicitly uses the event value to trigger. [Skotlex]
-		if (!flag && (event == -1 || event == MSC_SKILLUSED)){
+		if (!flag && (event == -1 || (event & 0xffff) == MSC_SKILLUSED)){
 			switch (ms[i].cond1)
 			{
 				case MSC_ALWAYS:

+ 2 - 2
src/map/party.c

@@ -743,8 +743,8 @@ int party_exp_share(struct party_data *p,struct block_list *src,unsigned int bas
 				job_exp = job_exp*bonus/100;
 		}
 		if (zeny) {
-			if (zeny/100 > UINT_MAX/bonus)
-				zeny = UINT_MAX;
+			if (zeny/100 > INT_MAX/bonus)
+				zeny = INT_MAX;
 			else if (zeny > 10000)
 				zeny = (zeny/100)*bonus;
 			else

+ 1 - 1
src/map/pc.c

@@ -5549,7 +5549,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
 	if(i != sd->sc.option)
 		pc_setoption(sd, i);
 
-	if(sd->hd && merc_is_hom_active(sd->hd) && !pc_checkskill(sd, AM_CALLHOMUN))
+	if(merc_is_hom_active(sd->hd) && !pc_checkskill(sd, AM_CALLHOMUN))
 		merc_hom_vaporize(sd, 0);
 	
 	if(sd->status.manner < 0)