Core/Misc: Various crash fixes

This commit is contained in:
xinef1 authored and roc13x committed 2017-05-05 01:59:34 +01:00
1 parent 02e174d7e9
commit b88200cd58
22 files changed
+79 -60

No files matched your search

+3 -3
View File
@@ -296,7 +296,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:
@@ -307,7 +307,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:
@@ -339,7 +339,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: