Core/PhaseMgr: Implemented Phase Definitions, Terrainswap and multiphasing

* fixes cataclysm aura effect SPELL_AURA_PHASE without phasemasks defined in miscValueA
* implements CONDITION_SOURCE_TYPE_PHASE_DEFINITION

Thanks to:
 - Cyberbrest: For the hard research work about multiphasing.
 - Venugh: He helped me with a lot of strange compile Errors.
 - Shauren: For the 4.3.4 phaseshift packet.
 - Booksize: He showed me how terrainswap works

Signed-off-by: Naios <[email protected]>
This commit is contained in:
Naios
2012-10-15 20:31:41 +02:00
parent c757f811f2
commit 61dce1a02e
25 changed files with 973 additions and 83 deletions
+27 -2
View File
@@ -90,6 +90,7 @@ public:
{ "areatriggers", SEC_ADMINISTRATOR, false, &HandleDebugAreaTriggersCommand, "", NULL },
{ "los", SEC_MODERATOR, false, &HandleDebugLoSCommand, "", NULL },
{ "moveflags", SEC_ADMINISTRATOR, false, &HandleDebugMoveflagsCommand, "", NULL },
{ "phase", SEC_MODERATOR, false, &HandleDebugPhaseCommand, "", NULL },
{ NULL, SEC_PLAYER, false, NULL, "", NULL }
};
static ChatCommand commandTable[] =
@@ -948,8 +949,21 @@ public:
if (!*args)
return false;
uint32 PhaseShift = atoi(args);
handler->GetSession()->SendSetPhaseShift(PhaseShift);
char* t = strtok((char*)args, " ");
char* p = strtok(NULL, " ");
if (!t)
return false;
std::set<uint32> terrainswap;
std::set<uint32> phaseId;
terrainswap.insert((uint32)atoi(t));
if (p)
phaseId.insert((uint32)atoi(p));
handler->GetSession()->SendSetPhaseShift(phaseId, terrainswap);
return true;
}
@@ -1330,6 +1344,17 @@ public:
handler->PSendSysMessage("Waypoint SQL written to SQL Developer log");
return true;
}
static bool HandleDebugPhaseCommand(ChatHandler* handler, char const* args)
{
Unit* unit = handler->getSelectedUnit();
Player* player = handler->GetSession()->GetPlayer();
if(unit && unit->GetTypeId() == TYPEID_PLAYER)
player = unit->ToPlayer();
player->GetPhaseMgr().SendDebugReportToPlayer(handler->GetSession()->GetPlayer());
return true;
}
};
void AddSC_debug_commandscript()