mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10:37:01 +00:00
Mant more cmangos Cata commits applied
Commit:
This commit is contained in:
parent
6db0ba8ae9
commit
8cac2f42db
51 changed files with 964 additions and 270 deletions
|
|
@ -79,6 +79,10 @@ GameObject::GameObject() : WorldObject(),
|
|||
m_groupLootTimer = 0;
|
||||
m_groupLootId = 0;
|
||||
m_lootGroupRecipientId = 0;
|
||||
|
||||
m_isInUse = false;
|
||||
m_reStockTimer = 0;
|
||||
m_despawnTimer = 0;
|
||||
}
|
||||
|
||||
GameObject::~GameObject()
|
||||
|
|
@ -1951,6 +1955,7 @@ void GameObject::SetLootRecipient(Unit* pUnit)
|
|||
{
|
||||
m_lootRecipientGuid.Clear();
|
||||
m_lootGroupRecipientId = 0;
|
||||
ForceValuesUpdateAtIndex(UNIT_DYNAMIC_FLAGS); // needed to be sure tapping status is updated
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1964,6 +1969,8 @@ void GameObject::SetLootRecipient(Unit* pUnit)
|
|||
// set group for group existed case including if player will leave group at loot time
|
||||
if (Group* group = player->GetGroup())
|
||||
{ m_lootGroupRecipientId = group->GetId(); }
|
||||
|
||||
ForceValuesUpdateAtIndex(UNIT_DYNAMIC_FLAGS); // needed to be sure tapping status is updated
|
||||
}
|
||||
|
||||
float GameObject::GetObjectBoundingRadius() const
|
||||
|
|
@ -2402,6 +2409,15 @@ float GameObject::GetInteractionDistance()
|
|||
}
|
||||
}
|
||||
|
||||
void GameObject::SetInUse(bool use)
|
||||
{
|
||||
m_isInUse = use;
|
||||
if (use)
|
||||
SetGoState(GO_STATE_ACTIVE);
|
||||
else
|
||||
SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
uint32 GameObject::GetScriptId()
|
||||
{
|
||||
return sScriptMgr.GetBoundScriptId(SCRIPTED_GAMEOBJECT, -int32(GetGUIDLow())) ? sScriptMgr.GetBoundScriptId(SCRIPTED_GAMEOBJECT, -int32(GetGUIDLow())) : sScriptMgr.GetBoundScriptId(SCRIPTED_GAMEOBJECT, GetEntry());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue