Core/Spells: Fixed crash in AuraEffect.HandlePlayScene
This commit is contained in:
@@ -38,7 +38,7 @@ namespace Game.Entities
|
|||||||
return PlaySceneByTemplate(sceneTemplate, position);
|
return PlaySceneByTemplate(sceneTemplate, position);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint PlaySceneByTemplate(SceneTemplate sceneTemplate, Position position = null)
|
public uint PlaySceneByTemplate(SceneTemplate sceneTemplate, Position position = null)
|
||||||
{
|
{
|
||||||
if (sceneTemplate == null)
|
if (sceneTemplate == null)
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -5977,15 +5977,14 @@ namespace Game.Spells
|
|||||||
if (!player)
|
if (!player)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint sceneId = (uint)GetMiscValue();
|
SceneTemplate sceneTemplate = Global.ObjectMgr.GetSceneTemplate((uint)GetMiscValue());
|
||||||
|
if (sceneTemplate == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (apply)
|
if (apply)
|
||||||
player.GetSceneMgr().PlayScene(sceneId);
|
player.GetSceneMgr().PlaySceneByTemplate(sceneTemplate);
|
||||||
else
|
else
|
||||||
{
|
|
||||||
SceneTemplate sceneTemplate = Global.ObjectMgr.GetSceneTemplate(sceneId);
|
|
||||||
player.GetSceneMgr().CancelSceneByPackageId(sceneTemplate.ScenePackageId);
|
player.GetSceneMgr().CancelSceneByPackageId(sceneTemplate.ScenePackageId);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[AuraEffectHandler(AuraType.AreaTrigger)]
|
[AuraEffectHandler(AuraType.AreaTrigger)]
|
||||||
|
|||||||
Reference in New Issue
Block a user