mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/Commands: enhanced .instance get/setbossstate commands
(cherry picked from commit 1ffec02d76)
# Conflicts:
# src/server/game/Instances/InstanceScript.cpp
# src/server/scripts/Commands/cs_instance.cpp
This commit is contained in:
@@ -659,3 +659,25 @@ void InstanceScript::UpdatePhasing()
|
||||
if (Player* player = itr->GetSource())
|
||||
player->SendUpdatePhasing();
|
||||
}
|
||||
|
||||
std::string InstanceScript::GetBossStateName(uint8 state)
|
||||
{
|
||||
// See enum EncounterState in InstanceScript.h
|
||||
switch (state)
|
||||
{
|
||||
case NOT_STARTED:
|
||||
return "NOT_STARTED";
|
||||
case IN_PROGRESS:
|
||||
return "IN_PROGRESS";
|
||||
case FAIL:
|
||||
return "FAIL";
|
||||
case DONE:
|
||||
return "DONE";
|
||||
case SPECIAL:
|
||||
return "SPECIAL";
|
||||
case TO_BE_DECIDED:
|
||||
return "TO_BE_DECIDED";
|
||||
default:
|
||||
return "INVALID";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user