aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/MapScripts.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-09-29 22:01:40 +0200
committerShauren <shauren.trinity@gmail.com>2025-09-29 22:56:35 +0200
commit5ef99978c03eb5cc7d40c1f1a1cc4e5c78f8ea27 (patch)
tree230d706c5738136329af74047f8e874c214ccce9 /src/server/game/Maps/MapScripts.cpp
parentbc7be2a08438a1d327586d4a57d4e99944b86418 (diff)
Core/Misc: Reduce differences between branches
Diffstat (limited to 'src/server/game/Maps/MapScripts.cpp')
-rw-r--r--src/server/game/Maps/MapScripts.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/server/game/Maps/MapScripts.cpp b/src/server/game/Maps/MapScripts.cpp
index d8bb33c74bf..d3e59b42dd7 100644
--- a/src/server/game/Maps/MapScripts.cpp
+++ b/src/server/game/Maps/MapScripts.cpp
@@ -113,10 +113,10 @@ inline Player* Map::_GetScriptPlayerSourceOrTarget(Object* source, Object* targe
player = source->ToPlayer();
if (!player)
- TC_LOG_ERROR("scripts", "{} neither source nor target object is player (source: TypeId: {}, Entry: {}, GUID: {}; target: TypeId: {}, Entry: {}, GUID: {}), skipping.",
+ TC_LOG_ERROR("scripts", "{} neither source nor target object is player (source: TypeId: {}, Entry: {}, {}; target: TypeId: {}, Entry: {}, {}), skipping.",
scriptInfo->GetDebugInfo().c_str(),
- source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUID().GetCounter() : 0,
- target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUID().GetCounter() : 0);
+ source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, (source ? source->GetGUID() : ObjectGuid::Empty).ToString().c_str(),
+ target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, (target ? target->GetGUID() : ObjectGuid::Empty).ToString().c_str());
}
return player;
}
@@ -146,10 +146,10 @@ inline Creature* Map::_GetScriptCreatureSourceOrTarget(Object* source, Object* t
}
if (!creature)
- TC_LOG_ERROR("scripts", "{} neither source nor target are creatures (source: TypeId: {}, Entry: {}, GUID: {}; target: TypeId: {}, Entry: {}, GUID: {}), skipping.",
+ TC_LOG_ERROR("scripts", "{} neither source nor target are creatures (source: TypeId: {}, Entry: {}, {}; target: TypeId: {}, Entry: {}, {}), skipping.",
scriptInfo->GetDebugInfo().c_str(),
- source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUID().GetCounter() : 0,
- target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUID().GetCounter() : 0);
+ source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, (source ? source->GetGUID() : ObjectGuid::Empty).ToString().c_str(),
+ target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, (target ? target->GetGUID() : ObjectGuid::Empty).ToString().c_str());
}
return creature;
}
@@ -179,10 +179,10 @@ inline GameObject* Map::_GetScriptGameObjectSourceOrTarget(Object* source, Objec
}
if (!gameobject)
- TC_LOG_ERROR("scripts", "{} neither source nor target are gameobjects (source: TypeId: {}, Entry: {}, GUID: {}; target: TypeId: {}, Entry: {}, GUID: {}), skipping.",
+ TC_LOG_ERROR("scripts", "{} neither source nor target are gameobjects (source: TypeId: {}, Entry: {}, {}; target: TypeId: {}, Entry: {}, {}), skipping.",
scriptInfo->GetDebugInfo().c_str(),
- source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUID().GetCounter() : 0,
- target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUID().GetCounter() : 0);
+ source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, (source ? source->GetGUID() : ObjectGuid::Empty).ToString().c_str(),
+ target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, (target ? target->GetGUID() : ObjectGuid::Empty).ToString().c_str());
}
return gameobject;
}
@@ -340,8 +340,8 @@ void Map::ScriptsProcess()
case HighGuid::Player:
source = GetPlayer(step.sourceGUID);
break;
- case HighGuid::Transport:
case HighGuid::GameObject:
+ case HighGuid::Transport:
source = GetGameObject(step.sourceGUID);
break;
case HighGuid::Corpse:
@@ -369,11 +369,11 @@ void Map::ScriptsProcess()
case HighGuid::Pet:
target = GetPet(step.targetGUID);
break;
- case HighGuid::Player: // empty GUID case also
+ case HighGuid::Player:
target = GetPlayer(step.targetGUID);
break;
- case HighGuid::Transport:
case HighGuid::GameObject:
+ case HighGuid::Transport:
target = GetGameObject(step.targetGUID);
break;
case HighGuid::Corpse:
@@ -826,6 +826,7 @@ void Map::ScriptsProcess()
{
return pair.second->IsAlive();
});
+
cTarget = creatureItr != creatureBounds.second ? creatureItr->second : creatureBounds.first->second;
}