aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/Map.cpp
diff options
context:
space:
mode:
authorclick <none@none>2010-08-06 03:00:39 +0200
committerclick <none@none>2010-08-06 03:00:39 +0200
commit0caaa3e478701e655ce0429a826abd48c023d1fd (patch)
tree9b605667a3ffa1fd37a6383669083ccd3ba0a875 /src/server/game/Maps/Map.cpp
parent71ef21de21be2e4fc426c8ebb3be3556e517bee0 (diff)
Revert changes done in r0074e32c2f and r4d86e4199a - fixes buildissues ( if()+reinterpret_cast is faster than dynamic_casts btw )
--HG-- branch : trunk
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rw-r--r--src/server/game/Maps/Map.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index bb37c748e0f..eed56efd026 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -2787,7 +2787,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) ? source->ToItem()->GetOwnerGUID() : (uint64)0;
+ uint64 ownerGUID = (source->GetTypeId() == TYPEID_ITEM) ? ((Item*)source)->GetOwnerGUID() : (uint64)0;
///- Schedule script execution for all scripts in the script map
ScriptMap const *s2 = &(s->second);
@@ -2822,7 +2822,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) ? source->ToItem()->GetOwnerGUID() : (uint64)0;
+ uint64 ownerGUID = (source->GetTypeId() == TYPEID_ITEM) ? ((Item*)source)->GetOwnerGUID() : (uint64)0;
ScriptAction sa;
sa.sourceGUID = sourceGUID;