mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 03:45:43 +00:00
refactor(Core/Object): adds consistency in the use of type object check (#19671)
This commit is contained in:
@@ -40,7 +40,7 @@ void Map::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, O
|
||||
// prepare static data
|
||||
ObjectGuid sourceGUID = source ? source->GetGUID() : ObjectGuid::Empty; //some script commands doesn't have source
|
||||
ObjectGuid targetGUID = target ? target->GetGUID() : ObjectGuid::Empty;
|
||||
ObjectGuid ownerGUID = (source && source->GetTypeId() == TYPEID_ITEM) ? ((Item*)source)->GetOwnerGUID() : ObjectGuid::Empty;
|
||||
ObjectGuid ownerGUID = (source && source->IsItem()) ? ((Item*)source)->GetOwnerGUID() : ObjectGuid::Empty;
|
||||
|
||||
///- Schedule script execution for all scripts in the script map
|
||||
ScriptMap const* s2 = &(s->second);
|
||||
@@ -75,7 +75,7 @@ void Map::ScriptCommandStart(ScriptInfo const& script, uint32 delay, Object* sou
|
||||
// prepare static data
|
||||
ObjectGuid sourceGUID = source ? source->GetGUID() : ObjectGuid::Empty;
|
||||
ObjectGuid targetGUID = target ? target->GetGUID() : ObjectGuid::Empty;
|
||||
ObjectGuid ownerGUID = (source && source->GetTypeId() == TYPEID_ITEM) ? ((Item*)source)->GetOwnerGUID() : ObjectGuid::Empty;
|
||||
ObjectGuid ownerGUID = (source && source->IsItem()) ? ((Item*)source)->GetOwnerGUID() : ObjectGuid::Empty;
|
||||
|
||||
ScriptAction sa;
|
||||
sa.sourceGUID = sourceGUID;
|
||||
|
||||
Reference in New Issue
Block a user