Browse Source

- Fixed @npcmove not sending the correct packets to make the moving refresh client-side.
- Fixed mobs with aggressive + looter mode never looting.
- skill_wall_check now also checks for pits so that skill effects don't go through them.
- Now you can't leave/be-kicked from a guild inside guild castles.


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

skotlex 19 years ago
parent
commit
3851b1299d
5 changed files with 15 additions and 7 deletions
  1. 6 0
      Changelog-Trunk.txt
  2. 2 2
      src/map/atcommand.c
  3. 3 2
      src/map/guild.c
  4. 3 2
      src/map/mob.c
  5. 1 1
      src/map/skill.c

+ 6 - 0
Changelog-Trunk.txt

@@ -4,6 +4,12 @@ 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.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 
 2006/04/09
 2006/04/09
+	* Fixed @npcmove not sending the correct packets to make the moving refresh
+	  client-side. [Skotlex]
+	* Fixed mobs with aggressive + looter mode never looting. [Skotlex]
+	* skill_wall_check now also checks for pits so that skill effects don't go
+	  through them. [Skotlex]
+	* Now you can't leave/be-kicked from a guild inside guild castles. [Skotlex]
 	* Fixed map_waterheight prefixing extra "data\" [Lance]
 	* Fixed map_waterheight prefixing extra "data\" [Lance]
 	* Mob_ai update. The attacked checks will trigger even if the mob can't
 	* Mob_ai update. The attacked checks will trigger even if the mob can't
 	  move. Being attacked while the mob can't move no longer will trigger
 	  move. Being attacked while the mob can't move no longer will trigger

+ 2 - 2
src/map/atcommand.c

@@ -7021,13 +7021,13 @@ atcommand_npcmove(const int fd, struct map_session_data* sd,
 	if ((m=nd->bl.m) < 0 || nd->bl.prev == NULL)
 	if ((m=nd->bl.m) < 0 || nd->bl.prev == NULL)
 		return -1;	//Not on a map.
 		return -1;	//Not on a map.
 	
 	
-	npc_enable(atcmd_player_name, 0);
 	if (x < 0) x = 0;
 	if (x < 0) x = 0;
 	else if (x >= map[m].xs) x = map[m].xs-1;
 	else if (x >= map[m].xs) x = map[m].xs-1;
 	if (y < 0) y = 0;
 	if (y < 0) y = 0;
 	else if (y >= map[m].ys) y = map[m].ys-1;
 	else if (y >= map[m].ys) y = map[m].ys-1;
+	map_foreachinrange(clif_outsight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl);
 	map_moveblock(&nd->bl, x, y, gettick());
 	map_moveblock(&nd->bl, x, y, gettick());
-	npc_enable(atcmd_player_name, 1);
+	map_foreachinrange(clif_insight, &nd->bl, AREA_SIZE, BL_PC, &nd->bl);
 
 
 	return 0;
 	return 0;
 }
 }

+ 3 - 2
src/map/guild.c

@@ -778,7 +778,8 @@ int guild_leave(struct map_session_data *sd,int guild_id,
 		return 0;
 		return 0;
 
 
 	if(	sd->status.account_id!=account_id ||
 	if(	sd->status.account_id!=account_id ||
-		sd->status.char_id!=char_id || sd->status.guild_id!=guild_id)
+		sd->status.char_id!=char_id || sd->status.guild_id!=guild_id ||
+		map[sd->bl.m].flag.gvg_castle) //Can't leave inside guild castles.
 		return 0;
 		return 0;
 
 
 	for(i=0;i<g->max_member;i++){	// �Š‘®‚µ‚Ä‚¢‚é‚©
 	for(i=0;i<g->max_member;i++){	// �Š‘®‚µ‚Ä‚¢‚é‚©
@@ -804,7 +805,7 @@ int guild_explusion(struct map_session_data *sd,int guild_id,
 	if(g==NULL)
 	if(g==NULL)
 		return 0;
 		return 0;
 
 
-	if(	sd->status.guild_id!=guild_id)
+	if(sd->status.guild_id!=guild_id || map[sd->bl.m].flag.gvg_castle) //Can't leave inside guild castles.
 		return 0;
 		return 0;
 
 
 	if( (ps=guild_getposition(sd,g))<0 || !(g->position[ps].mode&0x0010) )
 	if( (ps=guild_getposition(sd,g))<0 || !(g->position[ps].mode&0x0010) )

+ 3 - 2
src/map/mob.c

@@ -1195,7 +1195,7 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
 		mob_ai_sub_hard_slavemob(md, tick);
 		mob_ai_sub_hard_slavemob(md, tick);
 
 
 	// Scan area for targets
 	// Scan area for targets
-	if ((mode&MD_AGGRESSIVE && battle_config.monster_active_enable && !tbl) ||
+	if ((!tbl && mode&MD_AGGRESSIVE && battle_config.monster_active_enable) ||
 		(mode&MD_ANGRY && md->state.skillstate == MSS_FOLLOW)
 		(mode&MD_ANGRY && md->state.skillstate == MSS_FOLLOW)
 	) {
 	) {
 		map_foreachinrange (mob_ai_sub_hard_activesearch, &md->bl,
 		map_foreachinrange (mob_ai_sub_hard_activesearch, &md->bl,
@@ -1204,7 +1204,8 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
 		search_size = view_range<md->db->range ? view_range:md->db->range;
 		search_size = view_range<md->db->range ? view_range:md->db->range;
 		map_foreachinrange (mob_ai_sub_hard_changechase, &md->bl,
 		map_foreachinrange (mob_ai_sub_hard_changechase, &md->bl,
 				search_size, (md->special_state.ai?BL_CHAR:BL_PC), md, &tbl);
 				search_size, (md->special_state.ai?BL_CHAR:BL_PC), md, &tbl);
-	} else if (!tbl && mode&MD_LOOTER && md->lootitem && 
+	}
+	if (!tbl && mode&MD_LOOTER && md->lootitem && 
 		(md->lootitem_count < LOOTITEM_SIZE || battle_config.monster_loot_type != 1))
 		(md->lootitem_count < LOOTITEM_SIZE || battle_config.monster_loot_type != 1))
 	{	// Scan area for items to loot, avoid trying to loot of the mob is full and can't consume the items.
 	{	// Scan area for items to loot, avoid trying to loot of the mob is full and can't consume the items.
 		map_foreachinrange (mob_ai_sub_hard_lootsearch, &md->bl,
 		map_foreachinrange (mob_ai_sub_hard_lootsearch, &md->bl,

+ 1 - 1
src/map/skill.c

@@ -6557,7 +6557,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
 		if (alive && battle_config.skill_wall_check) {
 		if (alive && battle_config.skill_wall_check) {
 			//Check if there's a path between cell and center of casting.
 			//Check if there's a path between cell and center of casting.
 			struct walkpath_data wpd;
 			struct walkpath_data wpd;
-			if (path_search2(&wpd,src->m,ux,uy,x,y,0x1)==-1)
+			if (path_search_real(&wpd,src->m,ux,uy,x,y,0x1,CELL_CHKNOREACH) == -1)
 				alive = 0;
 				alive = 0;
 		}
 		}