aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/MapScripts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Maps/MapScripts.cpp')
-rw-r--r--src/server/game/Maps/MapScripts.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Maps/MapScripts.cpp b/src/server/game/Maps/MapScripts.cpp
index 2e886a287c4..1819b2e6739 100644
--- a/src/server/game/Maps/MapScripts.cpp
+++ b/src/server/game/Maps/MapScripts.cpp
@@ -44,7 +44,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->isType(TYPEMASK_ITEM)) ? ((Item*)source)->GetOwnerGUID() : ObjectGuid::Empty;
///- Schedule script execution for all scripts in the script map
ScriptMap const* s2 = &(s->second);
@@ -79,7 +79,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->isType(TYPEMASK_ITEM)) ? ((Item*)source)->GetOwnerGUID() : ObjectGuid::Empty;
ScriptAction sa;
sa.sourceGUID = sourceGUID;