feat(Core/Misc): implement ObjectGuid class (port from TC) (#4885)

This commit is contained in:
UltraNix
2021-04-25 22:18:03 +02:00
committed by GitHub
parent 91081f4ad8
commit f4c226423d
568 changed files with 10655 additions and 11019 deletions

View File

@@ -116,7 +116,7 @@ public:
bool Load() override
{
_procTargetGUID = 0;
_procTargetGUID.Clear();
return true;
}
@@ -154,7 +154,7 @@ public:
}
private:
uint64 _procTargetGUID;
ObjectGuid _procTargetGUID;
};
AuraScript* GetAuraScript() const override
@@ -282,7 +282,8 @@ public:
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(enchant->spellid[s]);
if (!spellInfo)
{
LOG_ERROR("server", "Player::CastItemCombatSpell Enchant %i, player (Name: %s, GUID: %u) cast unknown spell %i", enchant->ID, player->GetName().c_str(), player->GetGUIDLow(), enchant->spellid[s]);
LOG_ERROR("server", "Player::CastItemCombatSpell Enchant %i, player (Name: %s, %s) cast unknown spell %i",
enchant->ID, player->GetName().c_str(), player->GetGUID().ToString().c_str(), enchant->spellid[s]);
continue;
}
@@ -394,7 +395,7 @@ public:
{
while (!_targets.empty())
{
uint64 guid = acore::Containers::SelectRandomContainerElement(_targets);
ObjectGuid guid = acore::Containers::SelectRandomContainerElement(_targets);
if (Unit* target = ObjectAccessor::GetUnit(*GetTarget(), guid))
{
// xinef: target may be no longer valid
@@ -437,7 +438,7 @@ public:
}
private:
std::list<uint64> _targets;
GuidList _targets;
};
AuraScript* GetAuraScript() const override