瀏覽代碼

- Fog of Wall won't affect the caster now in any way.
- Added a missing status_calc_mob on mob_spawn_guardian_sub
- Added clif_fixpos packets before attacking for the first time to clear any position sync issues with the client.


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

skotlex 19 年之前
父節點
當前提交
90764dcab4
共有 4 個文件被更改,包括 16 次插入5 次删除
  1. 3 0
      Changelog-Trunk.txt
  2. 2 0
      src/map/mob.c
  3. 3 2
      src/map/skill.c
  4. 8 3
      src/map/unit.c

+ 3 - 0
Changelog-Trunk.txt

@@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2006/06/05
+	* Fog of Wall won't affect the caster now in any way. [Skotlex]
+	* Added clif_fixpos packets before attacking for the first time to clear
+	  any position sync issues with the client. [Skotlex]
 	* Fixed skill_unitsetting using layout->count for the for instead of
 	  group->count [Skotlex]
 	* Added SC_INCDEXRATE/SC_INCAGIRATE. NPC_POWERUP/NPC_AGIUP now correctly

+ 2 - 0
src/map/mob.c

@@ -421,6 +421,8 @@ static int mob_spawn_guardian_sub(int tid,unsigned int tick,int id,int data)
 	md->guardian_data->emblem_id = g->emblem_id;
 	memcpy (md->guardian_data->guild_name, g->name, NAME_LENGTH);
 	md->guardian_data->guardup_lv = guild_checkskill(g,GD_GUARDUP);
+	if(md->guardian_data->guardup_lv)
+		status_calc_mob(md, 0); //Give bonuses.
 	return 0;
 }
 

+ 3 - 2
src/map/skill.c

@@ -6570,8 +6570,7 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
 	case UNT_SERVICEFORYOU:
 		if (sg->src_id==bl->id && (!sc || sc->data[SC_SPIRIT].timer == -1 || sc->data[SC_SPIRIT].val2 != SL_BARDDANCER))
 			return 0;
-		if (!sc)
-			break;
+		if (!sc) return 0;
 		if (sc->data[type].timer==-1)
 			sc_start4(bl,type,100,sg->skill_lv,sg->val1,sg->val2,0,sg->limit);
 		else if (sc->data[type].val4 == 1) {
@@ -6582,6 +6581,8 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
 		}
 		break;
 	case UNT_FOGWALL:
+		if (sg->src_id==bl->id)
+			return 0;
 		if (sc && sc->data[type].timer==-1)
 		{
 			sc_start4(bl, type, 100, sg->skill_lv, sg->val1, sg->val2, sg->group_id, sg->limit);

+ 8 - 3
src/map/unit.c

@@ -229,8 +229,11 @@ static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data)
 		}
 		if (tbl->m == bl->m && check_distance_bl(bl, tbl, ud->chaserange))
 		{	//Reached destination.
-			if (ud->state.attack_continue)
+			if (ud->state.attack_continue) {
+				clif_fixpos(bl); //Aegis uses one before every attack, we should
+				  //only need this one for syncing purposes. [Skotlex]
 				unit_attack(bl, tbl->id, ud->state.attack_continue);
+			}
 		} else { //Update chase-path
 			unit_walktobl(bl, tbl, ud->chaserange, ud->state.walk_easy|(ud->state.attack_continue?2:0));
 			return 0;
@@ -238,8 +241,6 @@ static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data)
 	} else {	//Stopped walking. Update to_x and to_y to current location [Skotlex]
 		ud->to_x = bl->x;
 		ud->to_y = bl->y;
-//		if (bl->type == BL_NPC) //Original eA code had this one only for BL_NPCs
-//			clif_fixpos(bl);
 	}
 	return 0;
 }
@@ -1247,6 +1248,10 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int t
 		return 1;
 	}
 
+	//Sync packet only for players.
+	//Non-players use the sync packet on the walk timer. [Skotlex]
+	if (tid == -1 && sd) clif_fixpos(src);
+
 	if(DIFF_TICK(ud->attackabletime,tick) <= 0) {
 		if (battle_config.attack_direction_change &&
 			(src->type&battle_config.attack_direction_change)) {