diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-11-10 13:58:43 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-11-10 13:58:43 +0000 |
commit | 63a949f169e63a4eae859bc92b8edbbd0c4be532 (patch) | |
tree | 095e3bda19c75275bf967030a9893691dcc28846 /src | |
parent | b19b2cd0e21bc0ce9d513469c4a575419aaf918e (diff) | |
download | hercules-63a949f169e63a4eae859bc92b8edbbd0c4be532.tar.gz hercules-63a949f169e63a4eae859bc92b8edbbd0c4be532.tar.bz2 hercules-63a949f169e63a4eae859bc92b8edbbd0c4be532.tar.xz hercules-63a949f169e63a4eae859bc92b8edbbd0c4be532.zip |
- Fog of Wall will fail when casted on top of a Volcano/Violent Gale
- Applied FlavioJS's fix to the npc whisper system.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9190 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/clif.c | 41 | ||||
-rw-r--r-- | src/map/skill.c | 4 |
2 files changed, 26 insertions, 19 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 2c2574187..4a9dab5ed 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -9044,7 +9044,6 @@ void clif_parse_Wis(int fd, struct map_session_data *sd) { // S 0096 <len>.w <ni int i=0;
struct npc_data *npc;
char split_data[10][50];
- int j=0,k=0;
char target[NAME_LENGTH+1];
char output[256];
RFIFOHEAD(fd);
@@ -9089,32 +9088,36 @@ void clif_parse_Wis(int fd, struct map_session_data *sd) { // S 0096 <len>.w <ni char *whisper_tmp = target+4; //Skip the NPC: string part.
if ((npc = npc_name2id(whisper_tmp)))
{
+ char *split, *str;
whisper_tmp=(char *)aMallocA((strlen((char *)(RFIFOP(fd,28)))+1)*sizeof(char));
-
+
+ str=whisper_tmp;
sprintf(whisper_tmp, "%s", (const char*)RFIFOP(fd,28));
- for( j=0;whisper_tmp[j]!='\0';j++)
- {
- if(whisper_tmp[j]!='#')
- {
- split_data[i][j-k]=whisper_tmp[j];
- }
- else
- {
- split_data[i][j-k]='\0';
- k=j+1;
- i++;
+ for( i=0; i < 10; ++i )
+ {// Splits the message using '#' as separators
+ split = strchr(str,'#');
+ if( split == NULL )
+ { // use the remaining string
+ strncpy(split_data[i], str, sizeof(split_data[0])/sizeof(char));
+ split_data[i][sizeof(split_data[0])/sizeof(char)-1] = '\0';
+ for( ++i; i < 10; ++i )
+ split_data[i][0] = '\0';
+ break;
}
- } // Splits the message using '#' as separators
- split_data[i][j-k]='\0';
+ *split = '\0';
+ strncpy(split_data[i], str, sizeof(split_data[0])/sizeof(char));
+ split_data[i][sizeof(split_data[0])/sizeof(char)-1] = '\0';
+ str = split+1;
+ }
aFree(whisper_tmp);
whisper_tmp=(char *)aMallocA(15*sizeof(char));
- for (j=0;j<=10;j++)
+ for (i=0;i<10;i++)
{
- sprintf(whisper_tmp, "@whispervar%d$", j);
- set_var(sd,whisper_tmp,(char *) split_data[j]);
- }//You don't need to zero them, just reset them [Kevin]
+ sprintf(whisper_tmp, "@whispervar%d$", i);
+ set_var(sd,whisper_tmp,(char *) split_data[i]);
+ }//You don't need to zero them, iust reset them [Kevin]
aFree(whisper_tmp);
whisper_tmp=(char *)aMallocA((strlen(npc->name)+18)*sizeof(char));
diff --git a/src/map/skill.c b/src/map/skill.c index c8365482a..da6244a3f 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6662,6 +6662,10 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid, val2 = skilllv*10; //Status ailment resistance break; case PF_FOGWALL: + //When casted on top of Volcano/Violent Gale it fails. + if (map_find_skill_unit_oncell(src,x,y,SA_VOLCANO,NULL) || + map_find_skill_unit_oncell(src,x,y,SA_VIOLENTGALE,NULL)) + return NULL; //When casted on top of Deluge/Suiton: Double duration. if (map_find_skill_unit_oncell(src,x,y,SA_DELUGE,NULL) || map_find_skill_unit_oncell(src,x,y,NJ_SUITON,NULL)) |