diff options
author | ShinDarth <borzifrancesco@gmail.com> | 2015-10-10 13:22:55 +0200 |
---|---|---|
committer | MitchesD <majklprofik@seznam.cz> | 2015-11-06 11:56:13 +0100 |
commit | 040b098aef5625645dc37d0f112cd24eb715fa43 (patch) | |
tree | 05b94ab857a23a97fdb1c2356ca825fea31a624f /src/server/game/Instances/InstanceScript.cpp | |
parent | ceed5e2d35606509ee0a855ad01ec4690ded6220 (diff) |
Scripts/Commands: enhanced .instance get/setbossstate commands
(cherry picked from commit 1ffec02d760fe88deb4ccce0d13bce344a20bd15)
# Conflicts:
# src/server/game/Instances/InstanceScript.cpp
# src/server/scripts/Commands/cs_instance.cpp
Diffstat (limited to 'src/server/game/Instances/InstanceScript.cpp')
-rw-r--r-- | src/server/game/Instances/InstanceScript.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index 01a82ecb5af..122c08acc1d 100644 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -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"; + } +} |