Core/Spells: Fixed crash in AuraEffect.HandlePlayScene

This commit is contained in:
hondacrx
2018-08-01 14:16:35 -04:00
parent ae08c81ce6
commit 9f962377fa
2 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ namespace Game.Entities
return PlaySceneByTemplate(sceneTemplate, position);
}
uint PlaySceneByTemplate(SceneTemplate sceneTemplate, Position position = null)
public uint PlaySceneByTemplate(SceneTemplate sceneTemplate, Position position = null)
{
if (sceneTemplate == null)
return 0;
+4 -5
View File
@@ -5977,15 +5977,14 @@ namespace Game.Spells
if (!player)
return;
uint sceneId = (uint)GetMiscValue();
SceneTemplate sceneTemplate = Global.ObjectMgr.GetSceneTemplate((uint)GetMiscValue());
if (sceneTemplate == null)
return;
if (apply)
player.GetSceneMgr().PlayScene(sceneId);
player.GetSceneMgr().PlaySceneByTemplate(sceneTemplate);
else
{
SceneTemplate sceneTemplate = Global.ObjectMgr.GetSceneTemplate(sceneId);
player.GetSceneMgr().CancelSceneByPackageId(sceneTemplate.ScenePackageId);
}
}
[AuraEffectHandler(AuraType.AreaTrigger)]