mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Core: Random cleanup + compile fix
This commit is contained in:
@@ -39,9 +39,9 @@ void Map::ScriptsStart(ScriptMapMap const& scripts, uint32 id, Object* source, O
|
||||
return;
|
||||
|
||||
// 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 sourceGUID = source ? source->GetGUID() : uint64(0); //some script commands doesn't have source
|
||||
uint64 targetGUID = target ? target->GetGUID() : uint64(0);
|
||||
uint64 ownerGUID = (source && source->GetTypeId() == TYPEID_ITEM) ? ((Item*)source)->GetOwnerGUID() : uint64(0);
|
||||
|
||||
///- Schedule script execution for all scripts in the script map
|
||||
ScriptMap const* s2 = &(s->second);
|
||||
@@ -74,9 +74,9 @@ void Map::ScriptCommandStart(ScriptInfo const& script, uint32 delay, Object* sou
|
||||
// NOTE: script record _must_ exist until command executed
|
||||
|
||||
// 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 sourceGUID = source ? source->GetGUID() : uint64(0);
|
||||
uint64 targetGUID = target ? target->GetGUID() : uint64(0);
|
||||
uint64 ownerGUID = (source && source->GetTypeId() == TYPEID_ITEM) ? ((Item*)source)->GetOwnerGUID() : uint64(0);
|
||||
|
||||
ScriptAction sa;
|
||||
sa.sourceGUID = sourceGUID;
|
||||
|
||||
Reference in New Issue
Block a user