mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Core/Misc: Various crash fixes (#19059)
* Replaced some FindPlayer calls with GetPlayer Fixed some more crashes * Correction
This commit is contained in:
@@ -295,7 +295,7 @@ void Map::ScriptsProcess()
|
||||
switch (step.sourceGUID.GetHigh())
|
||||
{
|
||||
case HighGuid::Item: // as well as HighGuid::Container
|
||||
if (Player* player = HashMapHolder<Player>::Find(step.ownerGUID))
|
||||
if (Player* player = GetPlayer(step.ownerGUID))
|
||||
source = player->GetItemByGuid(step.sourceGUID);
|
||||
break;
|
||||
case HighGuid::Unit:
|
||||
@@ -306,7 +306,7 @@ void Map::ScriptsProcess()
|
||||
source = GetPet(step.sourceGUID);
|
||||
break;
|
||||
case HighGuid::Player:
|
||||
source = HashMapHolder<Player>::Find(step.sourceGUID);
|
||||
source = GetPlayer(step.sourceGUID);
|
||||
break;
|
||||
case HighGuid::Transport:
|
||||
case HighGuid::GameObject:
|
||||
@@ -338,7 +338,7 @@ void Map::ScriptsProcess()
|
||||
target = GetPet(step.targetGUID);
|
||||
break;
|
||||
case HighGuid::Player: // empty GUID case also
|
||||
target = HashMapHolder<Player>::Find(step.targetGUID);
|
||||
target = GetPlayer(step.targetGUID);
|
||||
break;
|
||||
case HighGuid::Transport:
|
||||
case HighGuid::GameObject:
|
||||
|
||||
Reference in New Issue
Block a user