mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[12705] Fix SMSG_BINDPOINTUPDATE and SMSG_PLAYERBOUND sent data
also improve DebugLog output (original author @Schmoozerd)
This commit is contained in:
parent
a5a5009d44
commit
ae593e19f0
2 changed files with 7 additions and 9 deletions
|
|
@ -10350,7 +10350,7 @@ void Spell::EffectBind(SpellEffectEntry const* effect)
|
|||
|
||||
Player* player = (Player*)unitTarget;
|
||||
|
||||
uint32 area_id;
|
||||
uint32 area_id = m_spellInfo->EffectMiscValue[eff_idx];
|
||||
WorldLocation loc;
|
||||
if (effect->EffectImplicitTargetA == TARGET_TABLE_X_Y_Z_COORDINATES ||
|
||||
effect->EffectImplicitTargetB == TARGET_TABLE_X_Y_Z_COORDINATES)
|
||||
|
|
@ -10367,12 +10367,14 @@ void Spell::EffectBind(SpellEffectEntry const* effect)
|
|||
loc.coord_y = st->target_Y;
|
||||
loc.coord_z = st->target_Z;
|
||||
loc.orientation = st->target_Orientation;
|
||||
area_id = sTerrainMgr.GetAreaId(loc.mapid, loc.coord_x, loc.coord_y, loc.coord_z);
|
||||
if (!area_id)
|
||||
area_id = sTerrainMgr.GetAreaId(loc.mapid, loc.coord_x, loc.coord_y, loc.coord_z);
|
||||
}
|
||||
else
|
||||
{
|
||||
player->GetPosition(loc);
|
||||
area_id = player->GetAreaId();
|
||||
if (!area_id)
|
||||
area_id = player->GetAreaId();
|
||||
}
|
||||
|
||||
player->SetHomebindToLocation(loc, area_id);
|
||||
|
|
@ -10386,11 +10388,7 @@ void Spell::EffectBind(SpellEffectEntry const* effect)
|
|||
data << uint32(area_id);
|
||||
player->SendDirectMessage(&data);
|
||||
|
||||
DEBUG_LOG("New Home Position X is %f", loc.coord_x);
|
||||
DEBUG_LOG("New Home Position Y is %f", loc.coord_y);
|
||||
DEBUG_LOG("New Home Position Z is %f", loc.coord_z);
|
||||
DEBUG_LOG("New Home MapId is %u", loc.mapid);
|
||||
DEBUG_LOG("New Home AreaId is %u", area_id);
|
||||
DEBUG_LOG("New Home Position for %s: XYZ: %f %f %f on Map %u", player->GetGuidStr().c_str(), loc.coord_x, loc.coord_y, loc.coord_z, loc.mapid);
|
||||
|
||||
// zone update
|
||||
data.Initialize(SMSG_PLAYERBOUND, 8 + 4);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12704"
|
||||
#define REVISION_NR "12705"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue