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:
ShinDarth
2015-10-10 13:22:55 +02:00
committed by MitchesD
parent ceed5e2d35
commit 040b098aef
4 changed files with 31 additions and 2 deletions

View File

@@ -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";
}
}