diff options
author | Shauren <none@none> | 2010-08-05 18:43:30 +0200 |
---|---|---|
committer | Shauren <none@none> | 2010-08-05 18:43:30 +0200 |
commit | 4773aad26b0d032d2a6cb0abe94cdd87a77f3064 (patch) | |
tree | b3e18f3d6abcbdd692ea1e7f1479bb38244cd9df /src/server/game/Maps/Map.cpp | |
parent | c94046b0651c1df362309c7f9b663745e7cd7fed (diff) |
Make use of new ToItem() casts
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rw-r--r-- | src/server/game/Maps/Map.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index f6b66427f6a..f8247e9ac27 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2800,7 +2800,7 @@ void Map::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, O // prepare static data uint64 sourceGUID = source ? source->GetGUID() : (uint64)0; //some script commands doesn't have source uint64 targetGUID = target ? target->GetGUID() : (uint64)0; - uint64 ownerGUID = (source->GetTypeId() == TYPEID_ITEM) ? ((Item*)source)->GetOwnerGUID() : (uint64)0; + uint64 ownerGUID = (source->GetTypeId() == TYPEID_ITEM) ? source->ToItem()->GetOwnerGUID() : (uint64)0; ///- Schedule script execution for all scripts in the script map ScriptMap const *s2 = &(s->second); @@ -2835,7 +2835,7 @@ void Map::ScriptCommandStart(ScriptInfo const& script, uint32 delay, Object* sou // prepare static data uint64 sourceGUID = source ? source->GetGUID() : (uint64)0; uint64 targetGUID = target ? target->GetGUID() : (uint64)0; - uint64 ownerGUID = (source->GetTypeId() == TYPEID_ITEM) ? ((Item*)source)->GetOwnerGUID() : (uint64)0; + uint64 ownerGUID = (source->GetTypeId() == TYPEID_ITEM) ? source->ToItem()->GetOwnerGUID() : (uint64)0; ScriptAction sa; sa.sourceGUID = sourceGUID; |