mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Core/Player: Fix Scene blackscreen (#19473)
* Move Flags from DBCEnums.h to SceneMgr.h (nothing to do with any DB2) * Send SMSG_CANCEL_SCENE if scene ends (canceled or completed)
This commit is contained in:
@@ -958,13 +958,4 @@ enum CurrencyTypes
|
||||
CURRENCY_TYPE_ARTIFACT_KNOWLEDGE = 1171,
|
||||
};
|
||||
|
||||
enum SceneFlags
|
||||
{
|
||||
SCENEFLAG_UNK1 = 0x01,
|
||||
SCENEFLAG_UNK2 = 0x02,
|
||||
SCENEFLAG_NOT_CANCELABLE = 0x04,
|
||||
SCENEFLAG_UNK8 = 0x08,
|
||||
SCENEFLAG_UNK16 = 0x10, // 16, most common value
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -121,6 +121,9 @@ void SceneMgr::OnSceneCancel(uint32 sceneInstanceID)
|
||||
RemoveAurasDueToSceneId(sceneTemplate->SceneId);
|
||||
|
||||
sScriptMgr->OnSceneCancel(GetPlayer(), sceneInstanceID, sceneTemplate);
|
||||
|
||||
if (sceneTemplate->PlaybackFlags & SCENEFLAG_CANCEL_AT_END)
|
||||
CancelScene(sceneInstanceID, false);
|
||||
}
|
||||
|
||||
void SceneMgr::OnSceneComplete(uint32 sceneInstanceID)
|
||||
@@ -140,6 +143,9 @@ void SceneMgr::OnSceneComplete(uint32 sceneInstanceID)
|
||||
RemoveAurasDueToSceneId(sceneTemplate->SceneId);
|
||||
|
||||
sScriptMgr->OnSceneComplete(GetPlayer(), sceneInstanceID, sceneTemplate);
|
||||
|
||||
if (sceneTemplate->PlaybackFlags & SCENEFLAG_CANCEL_AT_END)
|
||||
CancelScene(sceneInstanceID, false);
|
||||
}
|
||||
|
||||
bool SceneMgr::HasScene(uint32 sceneInstanceID, uint32 sceneScriptPackageId /*= 0*/) const
|
||||
|
||||
@@ -19,7 +19,16 @@
|
||||
#define SceneMgr_h__
|
||||
|
||||
#include "Common.h"
|
||||
#include "DBCEnums.h"
|
||||
|
||||
enum SceneFlags
|
||||
{
|
||||
SCENEFLAG_UNK1 = 0x01,
|
||||
SCENEFLAG_CANCEL_AT_END = 0x02,
|
||||
SCENEFLAG_NOT_CANCELABLE = 0x04,
|
||||
SCENEFLAG_UNK8 = 0x08,
|
||||
SCENEFLAG_UNK16 = 0x10, // 16, most common value
|
||||
SCENEFLAG_UNK32 = 0x20,
|
||||
};
|
||||
|
||||
class Player;
|
||||
struct Position;
|
||||
|
||||
Reference in New Issue
Block a user