mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[8553] removed spiritguide from code
they basicaly should *autocast 22011 *give player after gossiphello buff 2584 *port players away to another spiritguides, when they die so this can be done by a script and maybe eventai
This commit is contained in:
parent
2da82a8c68
commit
1f9b4ca4c3
12 changed files with 25 additions and 153 deletions
|
|
@ -130,7 +130,6 @@ BattleGround::BattleGround()
|
|||
m_Status = STATUS_NONE;
|
||||
m_ClientInstanceID = 0;
|
||||
m_EndTime = 0;
|
||||
m_LastResurrectTime = 0;
|
||||
m_QueueId = QUEUE_ID_MAX_LEVEL_19;
|
||||
m_InvitedAlliance = 0;
|
||||
m_InvitedHorde = 0;
|
||||
|
|
@ -260,62 +259,6 @@ void BattleGround::Update(uint32 diff)
|
|||
}
|
||||
}
|
||||
|
||||
/*********************************************************/
|
||||
/*** BATTLEGROUND RESSURECTION SYSTEM ***/
|
||||
/*********************************************************/
|
||||
|
||||
//this should be handled by spell system
|
||||
m_LastResurrectTime += diff;
|
||||
if (m_LastResurrectTime >= RESURRECTION_INTERVAL)
|
||||
{
|
||||
if (GetReviveQueueSize())
|
||||
{
|
||||
for(std::map<uint64, std::vector<uint64> >::iterator itr = m_ReviveQueue.begin(); itr != m_ReviveQueue.end(); ++itr)
|
||||
{
|
||||
Creature *sh = NULL;
|
||||
for(std::vector<uint64>::const_iterator itr2 = (itr->second).begin(); itr2 != (itr->second).end(); ++itr2)
|
||||
{
|
||||
Player *plr = objmgr.GetPlayer(*itr2);
|
||||
if (!plr)
|
||||
continue;
|
||||
|
||||
if (!sh && plr->IsInWorld())
|
||||
{
|
||||
sh = plr->GetMap()->GetCreature(itr->first);
|
||||
// only for visual effect
|
||||
if (sh)
|
||||
// Spirit Heal, effect 117
|
||||
sh->CastSpell(sh, SPELL_SPIRIT_HEAL, true);
|
||||
}
|
||||
|
||||
// Resurrection visual
|
||||
plr->CastSpell(plr, SPELL_RESURRECTION_VISUAL, true);
|
||||
m_ResurrectQueue.push_back(*itr2);
|
||||
}
|
||||
(itr->second).clear();
|
||||
}
|
||||
|
||||
m_ReviveQueue.clear();
|
||||
m_LastResurrectTime = 0;
|
||||
}
|
||||
else
|
||||
// queue is clear and time passed, just update last resurrection time
|
||||
m_LastResurrectTime = 0;
|
||||
}
|
||||
else if (m_LastResurrectTime > 500) // Resurrect players only half a second later, to see spirit heal effect on NPC
|
||||
{
|
||||
for(std::vector<uint64>::const_iterator itr = m_ResurrectQueue.begin(); itr != m_ResurrectQueue.end(); ++itr)
|
||||
{
|
||||
Player *plr = objmgr.GetPlayer(*itr);
|
||||
if (!plr)
|
||||
continue;
|
||||
plr->ResurrectPlayer(1.0f);
|
||||
plr->CastSpell(plr, SPELL_SPIRIT_HEAL_MANA, true);
|
||||
ObjectAccessor::Instance().ConvertCorpseForPlayer(*itr);
|
||||
}
|
||||
m_ResurrectQueue.clear();
|
||||
}
|
||||
|
||||
/*********************************************************/
|
||||
/*** BATTLEGROUND BALLANCE SYSTEM ***/
|
||||
/*********************************************************/
|
||||
|
|
@ -972,8 +915,6 @@ void BattleGround::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
|
|||
m_PlayerScores.erase(itr2);
|
||||
}
|
||||
|
||||
RemovePlayerFromResurrectQueue(guid);
|
||||
|
||||
Player *plr = objmgr.GetPlayer(guid);
|
||||
|
||||
// should remove spirit of redemption
|
||||
|
|
@ -1088,7 +1029,6 @@ void BattleGround::Reset()
|
|||
SetStatus(STATUS_WAIT_QUEUE);
|
||||
SetStartTime(0);
|
||||
SetEndTime(0);
|
||||
SetLastResurrectTime(0);
|
||||
SetArenaType(0);
|
||||
SetRated(false);
|
||||
|
||||
|
|
@ -1119,7 +1059,6 @@ void BattleGround::Reset()
|
|||
void BattleGround::StartBattleGround()
|
||||
{
|
||||
SetStartTime(0);
|
||||
SetLastResurrectTime(0);
|
||||
|
||||
// add BG to free slot queue
|
||||
AddToBGFreeSlotQueue();
|
||||
|
|
@ -1351,39 +1290,6 @@ void BattleGround::UpdatePlayerScore(Player *Source, uint32 type, uint32 value)
|
|||
}
|
||||
}
|
||||
|
||||
void BattleGround::AddPlayerToResurrectQueue(uint64 npc_guid, uint64 player_guid)
|
||||
{
|
||||
m_ReviveQueue[npc_guid].push_back(player_guid);
|
||||
|
||||
Player *plr = objmgr.GetPlayer(player_guid);
|
||||
if (!plr)
|
||||
return;
|
||||
|
||||
plr->CastSpell(plr, SPELL_WAITING_FOR_RESURRECT, true);
|
||||
}
|
||||
|
||||
void BattleGround::RemovePlayerFromResurrectQueue(uint64 player_guid)
|
||||
{
|
||||
for(std::map<uint64, std::vector<uint64> >::iterator itr = m_ReviveQueue.begin(); itr != m_ReviveQueue.end(); ++itr)
|
||||
{
|
||||
for(std::vector<uint64>::iterator itr2 =(itr->second).begin(); itr2 != (itr->second).end(); ++itr2)
|
||||
{
|
||||
if (*itr2 == player_guid)
|
||||
{
|
||||
(itr->second).erase(itr2);
|
||||
|
||||
Player *plr = objmgr.GetPlayer(player_guid);
|
||||
if (!plr)
|
||||
return;
|
||||
|
||||
plr->RemoveAurasDueToSpell(SPELL_WAITING_FOR_RESURRECT);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool BattleGround::AddObject(uint32 type, uint32 entry, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime)
|
||||
{
|
||||
Map * map = MapManager::Instance().FindMap(GetMapId(),GetInstanceID());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue