summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-24 14:49:55 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-24 14:49:55 +0000
commitd38ebf04d586987812b1c92d919bcac7e2f99d2e (patch)
tree26b1796f8ffba759dfd7dfcd7205a98f5df2b6b9 /src
parenta22a322ce7be85620c1156c542e7b15761fe2f34 (diff)
downloadhercules-d38ebf04d586987812b1c92d919bcac7e2f99d2e.tar.gz
hercules-d38ebf04d586987812b1c92d919bcac7e2f99d2e.tar.bz2
hercules-d38ebf04d586987812b1c92d919bcac7e2f99d2e.tar.xz
hercules-d38ebf04d586987812b1c92d919bcac7e2f99d2e.zip
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9311 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c22
-rw-r--r--src/map/map.c6
-rw-r--r--src/map/pc.c2
-rw-r--r--src/map/skill.c5
4 files changed, 20 insertions, 15 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 3d7d935fb..931a46cff 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -2891,9 +2891,8 @@ int clif_changelook(struct block_list *bl,int type,int val)
struct view_data *vd;
vd = status_get_viewdata(bl);
nullpo_retr(0, vd);
-
- if(bl->type == BL_PC)
- sd = (struct map_session_data *)bl;
+
+ BL_CAST(BL_PC, bl, sd);
switch(type) {
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)
{
- 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]
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
int i;
+ WFIFOHEAD(fd,packet_len_table[0xd1]);
RFIFOHEAD(fd);
malloc_tsetdword(output, '\0', sizeof(output));
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
WFIFOB(fd,2) = RFIFOB(fd,26);
// 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
WFIFOSET(fd, packet_len_table[0x0d1]);
clif_wis_message(fd, wisp_server_name,
diff --git a/src/map/map.c b/src/map/map.c
index 5e4ea6b9e..8d596b394 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -961,12 +961,8 @@ int map_foreachinmovearea(int (*func)(struct block_list*,va_list),int m,int x0,i
map_freeblock_lock(); // メモリからの解放を禁止する
for(i=blockcount;i<bl_list_count;i++)
- if(bl_list[i]->prev) { // 有?かどうかチェック
- if (bl_list[i]->type == BL_PC
- && ((TBL_PC*) bl_list[i])->fd == 0)
- continue;
+ if(bl_list[i]->prev)
returnCount += func(bl_list[i],ap);
- }
map_freeblock_unlock(); // 解放を許可する
diff --git a/src/map/pc.c b/src/map/pc.c
index a589694d8..5a41868d2 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -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.");
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)
return 0;
//Dead Branch & Bloody Branch & Porings Box (can't use at GVG and when nobranch flag is on)
diff --git a/src/map/skill.c b/src/map/skill.c
index 6bd17dec0..8cb9a35c5 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -876,7 +876,8 @@ int skillnotok (int skillid, struct map_session_data *sd)
return 0;
break;
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);
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);
}
if (i) {
- status_heal(src, 0, i, 3);
clif_skill_nodamage(src,bl,skillid,skilllv,0);
+ status_heal(src, 0, i, 3);
}
break;