diff options
author | Haru <haru@dotalux.com> | 2017-04-25 17:04:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-25 17:04:15 +0200 |
commit | 7064be0489c91268b28081e6f11d92fd3ffc99b1 (patch) | |
tree | fc6976977383962d8159e98bd2425127081192c9 /src/map/pc.c | |
parent | 89ffb3db746b016ea1cc12ef2f148152ed280172 (diff) | |
parent | 98a96e7d4977d50b2b5553786a4994e07fbba528 (diff) | |
download | hercules-7064be0489c91268b28081e6f11d92fd3ffc99b1.tar.gz hercules-7064be0489c91268b28081e6f11d92fd3ffc99b1.tar.bz2 hercules-7064be0489c91268b28081e6f11d92fd3ffc99b1.tar.xz hercules-7064be0489c91268b28081e6f11d92fd3ffc99b1.zip |
Merge pull request #1689 from Jedzkie/2-GiantFlyWing
Implemented official Giant Fly Wing Effect
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 b1203e519..582abf71c 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4844,10 +4844,40 @@ int pc_isUseitem(struct map_session_data *sd,int n) if (map_flag_gvg2(sd->bl.m)) 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 */ |