- The check that blocks the skill AL_TELEPORT on noteleport maps will be overriden when you use Flywings/Butterfly wings, so B Wings are usable again in noteleport maps.

- Removed a fd check in foreachinmovearea, which explains why autotraders sometimes were invisible to people who walked within sight of them
- Corrected the ignore list sorting function to account for entries with no names so they are sent to the end, not the beginning.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9311 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-11-24 14:49:55 +00:00
parent 964ede96d5
commit 9db096c861
4 changed files with 20 additions and 15 deletions

View File

@ -2891,9 +2891,8 @@ int clif_changelook(struct block_list *bl,int type,int val)
struct view_data *vd; struct view_data *vd;
vd = status_get_viewdata(bl); vd = status_get_viewdata(bl);
nullpo_retr(0, vd); nullpo_retr(0, vd);
if(bl->type == BL_PC) BL_CAST(BL_PC, bl, sd);
sd = (struct map_session_data *)bl;
switch(type) { switch(type) {
case LOOK_WEAPON: case LOOK_WEAPON:
@ -11053,25 +11052,34 @@ void clif_parse_GMReqNoChatCount(int fd, struct map_session_data *sd)
static int pstrcmp(const void *a, const void *b) static int pstrcmp(const void *a, const void *b)
{ {
return strcmp((char *)a, (char *)b); char *name1 = (char *)a;
char *name2 = (char *)b;
if (name1[0] && name2[0])
return strcmp(name1, name2);
//Since names are sorted in ascending order, send blank entries to the bottom.
if (name1[0])
return -1;
if (name2[0])
return 1;
return 0;
} }
void clif_parse_PMIgnore(int fd, struct map_session_data *sd) { // Rewritten by [Yor] void clif_parse_PMIgnore(int fd, struct map_session_data *sd) { // Rewritten by [Yor]
char output[512]; char output[512];
char *nick; // S 00cf <nick>.24B <type>.B: 00 (/ex nick) deny speech from nick, 01 (/in nick) allow speech from nick char *nick; // S 00cf <nick>.24B <type>.B: 00 (/ex nick) deny speech from nick, 01 (/in nick) allow speech from nick
int i; int i;
WFIFOHEAD(fd,packet_len_table[0xd1]);
RFIFOHEAD(fd); RFIFOHEAD(fd);
malloc_tsetdword(output, '\0', sizeof(output)); malloc_tsetdword(output, '\0', sizeof(output));
nick = (char*)RFIFOP(fd,2); // speed up nick = (char*)RFIFOP(fd,2); // speed up
RFIFOB(fd,NAME_LENGTH+1) = '\0'; // to be sure that the player name have at maximum 23 characters (nick range: [2]->[26]) nick[NAME_LENGTH-1] = '\0'; // to be sure that the player name have at maximum 23 characters
WFIFOHEAD(fd,packet_len_table[0xd1]);
WFIFOW(fd,0) = 0x0d1; // R 00d1 <type>.B <fail>.B: type: 0: deny, 1: allow, fail: 0: success, 1: fail WFIFOW(fd,0) = 0x0d1; // R 00d1 <type>.B <fail>.B: type: 0: deny, 1: allow, fail: 0: success, 1: fail
WFIFOB(fd,2) = RFIFOB(fd,26); WFIFOB(fd,2) = RFIFOB(fd,26);
// do nothing only if nick can not exist // do nothing only if nick can not exist
if ((i = strlen(nick)) < 4 || i > NAME_LENGTH) { if ((i = strlen(nick)) < 4) {
WFIFOB(fd,3) = 1; // fail WFIFOB(fd,3) = 1; // fail
WFIFOSET(fd, packet_len_table[0x0d1]); WFIFOSET(fd, packet_len_table[0x0d1]);
clif_wis_message(fd, wisp_server_name, clif_wis_message(fd, wisp_server_name,

View File

@ -961,12 +961,8 @@ int map_foreachinmovearea(int (*func)(struct block_list*,va_list),int m,int x0,i
map_freeblock_lock(); // メモリからの解放を禁止する map_freeblock_lock(); // メモリからの解放を禁止する
for(i=blockcount;i<bl_list_count;i++) for(i=blockcount;i<bl_list_count;i++)
if(bl_list[i]->prev) { // 有?かどうかチェック if(bl_list[i]->prev)
if (bl_list[i]->type == BL_PC
&& ((TBL_PC*) bl_list[i])->fd == 0)
continue;
returnCount += func(bl_list[i],ap); returnCount += func(bl_list[i],ap);
}
map_freeblock_unlock(); // 解放を許可する map_freeblock_unlock(); // 解放を許可する

View File

@ -2883,7 +2883,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
clif_displaymessage(sd->fd, "Duel: Can't use this item in duel."); clif_displaymessage(sd->fd, "Duel: Can't use this item in duel.");
return 0; return 0;
} }
//Butterfly Wing (can't use noreturn flag is on and if duel) //Butterfly Wing (can't use noreturn flag is on)
if(nameid == 602 && map[sd->bl.m].flag.noreturn) if(nameid == 602 && map[sd->bl.m].flag.noreturn)
return 0; return 0;
//Dead Branch & Bloody Branch & Porings Box (can't use at GVG and when nobranch flag is on) //Dead Branch & Bloody Branch & Porings Box (can't use at GVG and when nobranch flag is on)

View File

@ -876,7 +876,8 @@ int skillnotok (int skillid, struct map_session_data *sd)
return 0; return 0;
break; break;
case AL_TELEPORT: case AL_TELEPORT:
if(map[m].flag.noteleport) { //Flywing/ButterflyWing are checked elsewhere
if(map[m].flag.noteleport && sd->skillitem != skillid) {
clif_skill_teleportmessage(sd,0); clif_skill_teleportmessage(sd,0);
return 1; return 1;
} }
@ -3945,8 +3946,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
mob_target(dstmd,src,0); mob_target(dstmd,src,0);
} }
if (i) { if (i) {
status_heal(src, 0, i, 3);
clif_skill_nodamage(src,bl,skillid,skilllv,0); clif_skill_nodamage(src,bl,skillid,skilllv,0);
status_heal(src, 0, i, 3);
} }
break; break;