[8963] Make bindpoint field private and add required functions for use.

This commit is contained in:
VladimirMangos 2009-12-10 12:14:11 +03:00
parent 4a2dc2438c
commit ed7d561597
9 changed files with 31 additions and 21 deletions

View file

@ -21270,3 +21270,16 @@ bool Player::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) c
}
return Unit::IsImmunedToSpellEffect(spellInfo, index);
}
void Player::SetHomebindToCurrentPos()
{
m_homebindMapId = GetMapId();
m_homebindZoneId = GetZoneId();
m_homebindX = GetPositionX();
m_homebindY = GetPositionY();
m_homebindZ = GetPositionZ();
// update sql homebind
CharacterDatabase.PExecute("UPDATE character_homebind SET map = '%u', zone = '%u', position_x = '%f', position_y = '%f', position_z = '%f' WHERE guid = '%u'",
m_homebindMapId, m_homebindZoneId, m_homebindX, m_homebindY, m_homebindZ, GetGUIDLow());
}