mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-11 23:42:24 +00:00
* [Hotfix] Fix EVENT_SPELL_EFFECT_TRANSLOCATE_COMPLETE regression caused by #2897 * Update client_packet.cpp
This commit is contained in:
parent
d107213fe1
commit
ccf8504dec
@ -15239,34 +15239,37 @@ void Client::Handle_OP_Translocate(const EQApplicationPacket *app)
|
|||||||
zone->GetInstanceID() == PendingTranslocateData.instance_id
|
zone->GetInstanceID() == PendingTranslocateData.instance_id
|
||||||
);
|
);
|
||||||
|
|
||||||
|
int quest_return = 0;
|
||||||
if (parse->SpellHasQuestSub(spell_id, EVENT_SPELL_EFFECT_TRANSLOCATE_COMPLETE)) {
|
if (parse->SpellHasQuestSub(spell_id, EVENT_SPELL_EFFECT_TRANSLOCATE_COMPLETE)) {
|
||||||
if (parse->EventSpell(EVENT_SPELL_EFFECT_TRANSLOCATE_COMPLETE, nullptr, this, spell_id, "", 0) == 0) {
|
quest_return = parse->EventSpell(EVENT_SPELL_EFFECT_TRANSLOCATE_COMPLETE, nullptr, this, spell_id, "", 0);
|
||||||
// If the spell has a translocate to bind effect, AND we are already in the zone the client
|
}
|
||||||
// is bound in, use the GoToBind method. If we send OP_Translocate in this case, the client moves itself
|
|
||||||
// to the bind coords it has from the PlayerProfile, but with the X and Y reversed. I suspect they are
|
|
||||||
// reversed in the pp, and since spells like Gate are handled serverside, this has not mattered before.
|
|
||||||
if (
|
|
||||||
IsTranslocateSpell(spell_id) &&
|
|
||||||
in_translocate_zone
|
|
||||||
) {
|
|
||||||
PendingTranslocate = false;
|
|
||||||
GoToBind();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
////Was sending the packet back to initiate client zone...
|
if (quest_return == 0) {
|
||||||
////but that could be abusable, so lets go through proper channels
|
// If the spell has a translocate to bind effect, AND we are already in the zone the client
|
||||||
MovePC(
|
// is bound in, use the GoToBind method. If we send OP_Translocate in this case, the client moves itself
|
||||||
PendingTranslocateData.zone_id,
|
// to the bind coords it has from the PlayerProfile, but with the X and Y reversed. I suspect they are
|
||||||
PendingTranslocateData.instance_id,
|
// reversed in the pp, and since spells like Gate are handled serverside, this has not mattered before.
|
||||||
PendingTranslocateData.x,
|
if (
|
||||||
PendingTranslocateData.y,
|
IsTranslocateSpell(spell_id) &&
|
||||||
PendingTranslocateData.z,
|
in_translocate_zone
|
||||||
PendingTranslocateData.heading,
|
) {
|
||||||
0,
|
PendingTranslocate = false;
|
||||||
ZoneSolicited
|
GoToBind();
|
||||||
);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////Was sending the packet back to initiate client zone...
|
||||||
|
////but that could be abusable, so lets go through proper channels
|
||||||
|
MovePC(
|
||||||
|
PendingTranslocateData.zone_id,
|
||||||
|
PendingTranslocateData.instance_id,
|
||||||
|
PendingTranslocateData.x,
|
||||||
|
PendingTranslocateData.y,
|
||||||
|
PendingTranslocateData.z,
|
||||||
|
PendingTranslocateData.heading,
|
||||||
|
0,
|
||||||
|
ZoneSolicited
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user