diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-02-24 01:16:33 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-02-24 01:16:33 +0000 |
commit | 9694f77616b2f127bcde59d49cc7e3cad832d0b3 (patch) | |
tree | fad4e5b61e2492cd5988c79d686f9812812d600a /src | |
parent | c2697bf53b8f72db25c8a7aa03c2297b17cf7bc5 (diff) | |
download | hercules-9694f77616b2f127bcde59d49cc7e3cad832d0b3.tar.gz hercules-9694f77616b2f127bcde59d49cc7e3cad832d0b3.tar.bz2 hercules-9694f77616b2f127bcde59d49cc7e3cad832d0b3.tar.xz hercules-9694f77616b2f127bcde59d49cc7e3cad832d0b3.zip |
- Player-summoned mobs won't level up now.
- Fixed Super Novice explosion spirits triggering no matter what you said on the third line. It now triggers on the fourth line....
- Fixed GTB blocking targetted spells when gtb_pvp_only was set.
- Merged the code of Ankle snare and Spider web. It no longer moves target if sc failed.
- Players should stop walking as soon as they start vending or get into a chat.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5382 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/chat.c | 3 | ||||
-rw-r--r-- | src/map/clif.c | 1 | ||||
-rw-r--r-- | src/map/pc.c | 2 | ||||
-rw-r--r-- | src/map/skill.c | 41 | ||||
-rw-r--r-- | src/map/status.c | 7 | ||||
-rw-r--r-- | src/map/vending.c | 1 |
6 files changed, 23 insertions, 32 deletions
diff --git a/src/map/chat.c b/src/map/chat.c index 821cd0858..3ea00e2ab 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -27,7 +27,7 @@ int chat_createchat(struct map_session_data *sd,int limit,int pub,char* pass,cha if (sd->chatID)
return 0; //Prevent people abusing the chat system by creating multiple chats, as pointed out by End of Exam. [Skotlex]
-
+ pc_stop_walking(sd,1);
cd = (struct chat_data *) aCalloc(1,sizeof(struct chat_data));
cd->limit = limit;
@@ -87,6 +87,7 @@ int chat_joinchat (struct map_session_data *sd, int chatid, char* pass) return 0;
}
+ pc_stop_walking(sd,1);
cd->usersd[cd->users] = sd;
cd->users++;
diff --git a/src/map/clif.c b/src/map/clif.c index 4b2b8e099..310fe3f9c 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -9155,6 +9155,7 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) { // S 008c < case 2:
if (strstr(message, msg_txt(506)))
sd->state.snovice_flag++;
+ break;
case 3:
if (skillnotok(MO_EXPLOSIONSPIRITS,sd))
break; //Do not override the noskill mapflag. [Skotlex]
diff --git a/src/map/pc.c b/src/map/pc.c index fd52944be..37834ab10 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5510,7 +5510,7 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage) }
if(battle_config.mobs_level_up && md && md->state.state!=MS_DEAD &&
md->level < pc_maxbaselv(sd) &&
- !md->guardian_data // Guardians should not level. [Skotlex]
+ !md->guardian_data && !md->special_state.ai// Guardians/summons should not level. [Skotlex]
) { // monster level up [Valaris]
clif_misceffect(&md->bl,0);
md->level++;
diff --git a/src/map/skill.c b/src/map/skill.c index faedbd39a..7f49264a6 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1141,16 +1141,6 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
- case PF_SPIDERWEB: /* ƒXƒpƒCƒ_?ƒEƒFƒbƒu */
- {
- int sec = skill_get_time2(skillid,skilllv);
- if(map[src->m].flag.pvp) //PvP‚Å‚Í?S‘©ŽžŠÔ”¼Œ¸?H
- sec = sec/2;
- battle_stopwalking(bl,1);
- status_change_start(bl,SkillStatusChangeTable[skillid],100,skilllv,0,0,0,sec,0);
- }
- break;
-
case ASC_METEORASSAULT: /* ƒ?ƒeƒIƒAƒTƒ‹ƒg */
//Any enemies hit by this skill will receive Stun, Darkness, or external bleeding status ailment with a 5%+5*SkillLV% chance.
switch(rand()%3) {
@@ -2492,7 +2482,8 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s if (status_isdead(src) || (src != bl && status_isdead(bl)))
return 1;
- if (skillid && skill_get_type(skillid) == BF_MAGIC && status_isimmune(bl))
+ if (skillid && skill_get_type(skillid) == BF_MAGIC &&
+ !battle_config.gtb_pvp_only && status_isimmune(bl))
//GTB makes all targetted skills silently fail.
return 1;
@@ -6910,19 +6901,21 @@ int skill_unit_onplace_timer(struct skill_unit *src,struct block_list *bl,unsign }
break;
+ case UNT_SPIDERWEB:
case UNT_ANKLESNARE:
- if(sg->val2==0 && tsc && tsc->data[SC_ANKLE].timer==-1){
+ if(sg->val2==0 && (!tsc || tsc->data[type].timer==-1 )){
int sec = skill_get_time2(sg->skill_id,sg->skill_lv);
- battle_stopwalking(bl,1);
- status_change_start(bl,SC_ANKLE,100,sg->skill_lv,0,0,0,sec,0);
- map_moveblock(bl, src->bl.x, src->bl.y, tick);
- clif_fixpos(bl);
+ if (status_change_start(bl,type,100,sg->skill_lv,0,0,0,sec,0))
+ {
+ map_moveblock(bl, src->bl.x, src->bl.y, tick);
+ clif_fixpos(bl);
+ sg->val2=bl->id;
+ }
//clif_01ac(&src->bl); //Removed? Check the openkore description of this packet: [Skotlex]
// 01AC: long ID
// Indicates that an object is trapped, but ID is not a
// valid monster or player ID.
- sg->limit=DIFF_TICK(tick,sg->tick)+sec;
- sg->val2=bl->id;
+ sg->limit = DIFF_TICK(tick,sg->tick)+sec;
sg->interval = -1;
src->range = 0;
}
@@ -7092,18 +7085,6 @@ int skill_unit_onplace_timer(struct skill_unit *src,struct block_list *bl,unsign }
break;
- case UNT_SPIDERWEB:
- if(sg->val2==0 && (!tsc || tsc->data[type].timer==-1 )){
- skill_additional_effect(ss,bl,sg->skill_id,sg->skill_lv,BF_MISC,tick);
- map_moveblock(bl, src->bl.x, src->bl.y, tick);
- clif_fixpos(bl);
- sg->limit = DIFF_TICK(tick,sg->tick)+skill_get_time2(sg->skill_id,sg->skill_lv);
- sg->val2=bl->id;
- sg->interval = -1;
- src->range = 0;
- }
- break;
-
case UNT_GRAVITATION:
if (skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0))
skill_additional_effect(ss,bl,sg->skill_id,sg->skill_lv,BF_MAGIC,tick);
diff --git a/src/map/status.c b/src/map/status.c index 13fec7709..91740d663 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -114,6 +114,7 @@ void initChangeTables(void) { set_sc(BS_OVERTHRUST, SC_OVERTHRUST, SI_OVERTHRUST);
set_sc(BS_MAXIMIZE, SC_MAXIMIZEPOWER, SI_MAXIMIZEPOWER);
set_sc(HT_LANDMINE, SC_STUN, SI_BLANK);
+ set_sc(HT_ANKLESNARE, SC_ANKLE, SI_BLANK);
set_sc(HT_SANDMAN, SC_SLEEP, SI_BLANK);
set_sc(HT_FLASHER, SC_BLIND, SI_BLANK);
set_sc(HT_FREEZINGTRAP, SC_FREEZE, SI_BLANK);
@@ -3389,6 +3390,10 @@ int status_get_sc_tick(struct block_list *bl, int type, int tick) // Changed to 3 secs and moved from skill.c [Skotlex]
min = 3000;
break;
+ case SC_SPIDERWEB:
+ if (map[bl->m].flag.pvp)
+ tick /=2;
+ break;
case SC_STOP:
// Unsure of this... but I get a feeling that agi reduces this
// (it was on Tiger Fist Code, but at -1 ms per 10 agi....
@@ -4409,6 +4414,8 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val case SC_CONFUSION:
case SC_CLOSECONFINE:
case SC_CLOSECONFINE2:
+ case SC_ANKLE:
+ case SC_SPIDERWEB:
battle_stopwalking(bl,1);
break;
case SC_HIDING:
diff --git a/src/map/vending.c b/src/map/vending.c index c2f0e2f5e..775fe756e 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -256,6 +256,7 @@ void vending_openvending(struct map_session_data *sd,int len,char *message,int f sd->vend_num = i;
memcpy(sd->message,message, MESSAGE_SIZE-1);
if (clif_openvending(sd,sd->vender_id,sd->vending) > 0){
+ pc_stop_walking(sd,1);
clif_showvendingboard(&sd->bl,message,0);
if(use_irc && irc_announce_shop_flag)
irc_announce_shop(sd,1);
|