diff options
author | Jedzkie <jedzkie13@rocketmail.com> | 2017-04-17 22:23:32 +0800 |
---|---|---|
committer | Jedzkie <jedzkie13@rocketmail.com> | 2017-04-23 13:59:59 +0800 |
commit | 98a96e7d4977d50b2b5553786a4994e07fbba528 (patch) | |
tree | 4eb21b46527f5bb072f38633984e40ba7b7bfba8 /src/map/pc.c | |
parent | 5802b22439441be1914ae9024d6ce06d51c0210f (diff) | |
download | hercules-98a96e7d4977d50b2b5553786a4994e07fbba528.tar.gz hercules-98a96e7d4977d50b2b5553786a4994e07fbba528.tar.bz2 hercules-98a96e7d4977d50b2b5553786a4994e07fbba528.tar.xz hercules-98a96e7d4977d50b2b5553786a4994e07fbba528.zip |
Implemented official Giant Fly Wing Effect
Update the *warpparty script commmand, credits to Dastgir
Coding-style fixes & whitespace adjustments in warpparty part in script.c
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index e9855c16d..30c07a58e 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4847,10 +4847,40 @@ int pc_isUseitem(struct map_session_data *sd,int n) if( pc_issit(sd) ) return 0; break; + + case ITEMID_GIANT_FLY_WING: { + struct party_data *p; + + if (!sd->status.party_id) { + clif->msgtable(sd, MSG_PARTY_MEMBER_NOT_SUMMONED); + break; + } + + if ((p = party->search(sd->status.party_id)) != NULL) { + int i; + int16 m; + + ARR_FIND(0, MAX_PARTY, i, p->data[i].sd == sd); + + if (i == MAX_PARTY || !p->party.member[i].leader) { + clif->msgtable(sd, MSG_PARTY_MEMBER_NOT_SUMMONED); + break; + } + + m = sd->bl.m; + + ARR_FIND(0, MAX_PARTY, i, p->data[i].sd && p->data[i].sd != sd && p->data[i].sd->bl.m == m); + + if (i == MAX_PARTY || pc_isdead(p->data[i].sd)) { + clif->msgtable(sd, MSG_PARTY_NO_MEMBER_IN_MAP); + break; + } + } + } + FALLTHROUGH case ITEMID_WING_OF_FLY: - case ITEMID_GIANT_FLY_WING: - if( map->list[sd->bl.m].flag.noteleport || map_flag_gvg2(sd->bl.m) ) { - clif->skill_mapinfomessage(sd,0); + if (map->list[sd->bl.m].flag.noteleport || map_flag_gvg2(sd->bl.m)) { + clif->skill_mapinfomessage(sd, 0); return 0; } /* Fall through */ |