mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Phase system development continue.
* Use WorldObject phase mask field instead explicit aura scan. This allow have phase for any world objects. * Add phase checks to packet broadcasters/object searchers. This let correctly work say/yell/area and multi/random target spells/aggro assistance in phased areas or target selection. * In GM-mode character presense (see and visible) in all phases except normal visibility efects including GM-visibility. TODO: summoned objects phase set base at owner phase, load phase mask for creatures/gameobjects from DB, in game commands.
This commit is contained in:
parent
0c43a425e8
commit
b5da610388
16 changed files with 223 additions and 121 deletions
|
|
@ -1984,9 +1984,15 @@ void Player::SetGameMaster(bool on)
|
|||
|
||||
getHostilRefManager().setOnlineOfflineState(false);
|
||||
CombatStop();
|
||||
|
||||
SetPhaseMask(PHASEMASK_ANYWHERE); // see and visible in all phases
|
||||
}
|
||||
else
|
||||
{
|
||||
// restore phase
|
||||
AuraList const& phases = GetAurasByType(SPELL_AURA_PHASE);
|
||||
SetPhaseMask(!phases.empty() ? phases.front()->GetMiscValue() : PHASEMASK_NORMAL);
|
||||
|
||||
m_ExtraFlags &= ~ PLAYER_EXTRA_GM_ON;
|
||||
setFactionForRace(getRace());
|
||||
RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_GM);
|
||||
|
|
@ -16894,7 +16900,7 @@ void Player::HandleStealthedUnitsDetection()
|
|||
cell.SetNoCreate();
|
||||
|
||||
MaNGOS::AnyStealthedCheck u_check;
|
||||
MaNGOS::UnitListSearcher<MaNGOS::AnyStealthedCheck > searcher(stealthedUnits, u_check);
|
||||
MaNGOS::UnitListSearcher<MaNGOS::AnyStealthedCheck > searcher(this,stealthedUnits, u_check);
|
||||
|
||||
TypeContainerVisitor<MaNGOS::UnitListSearcher<MaNGOS::AnyStealthedCheck >, WorldTypeMapContainer > world_unit_searcher(searcher);
|
||||
TypeContainerVisitor<MaNGOS::UnitListSearcher<MaNGOS::AnyStealthedCheck >, GridTypeMapContainer > grid_unit_searcher(searcher);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue