Core/Spells: Fixed crash in AuraEffect.HandlePlayScene
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user