Code Style: Remove trailing spaces
--HG-- branch : trunk
This commit is contained in:
@@ -199,7 +199,7 @@ bool ArenaTeam::LoadArenaTeamFromDB(QueryResult_AutoPtr arenaTeamDataResult)
|
||||
m_stats.games_season = fields[12].GetUInt32();
|
||||
m_stats.wins_season = fields[13].GetUInt32();
|
||||
m_stats.rank = fields[14].GetUInt32();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -322,7 +322,7 @@ void ArenaTeam::Disband(WorldSession *session)
|
||||
// Removing from members is done in DelMember.
|
||||
DelMember(m_members.front().guid);
|
||||
}
|
||||
|
||||
|
||||
if (session)
|
||||
{
|
||||
if(Player *player = session->GetPlayer())
|
||||
|
||||
@@ -615,7 +615,7 @@ void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data )
|
||||
return;
|
||||
}
|
||||
|
||||
//check if any arena enabled
|
||||
//check if any arena enabled
|
||||
if (!sBattleGroundMgr.isAnyArenaEnabled())
|
||||
{
|
||||
SendBattleGroundOrArenaJoinError(BG_JOIN_ERR_ARENA_DISABLED);
|
||||
|
||||
@@ -1394,9 +1394,9 @@ void BattleGroundMgr::BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg)
|
||||
case BATTLEGROUND_RL:
|
||||
case BATTLEGROUND_SA:
|
||||
*data << uint32(2);
|
||||
*data << uint32(((BattleGroundSAScore*)itr->second)->demolishers_destroyed);
|
||||
*data << uint32(((BattleGroundSAScore*)itr->second)->gates_destroyed);
|
||||
break;
|
||||
*data << uint32(((BattleGroundSAScore*)itr->second)->demolishers_destroyed);
|
||||
*data << uint32(((BattleGroundSAScore*)itr->second)->gates_destroyed);
|
||||
break;
|
||||
case BATTLEGROUND_DS: // wotlk
|
||||
case BATTLEGROUND_RV: // wotlk
|
||||
case BATTLEGROUND_IC: // wotlk
|
||||
@@ -1534,7 +1534,7 @@ BattleGround * BattleGroundMgr::CreateNewBattleGround(BattleGroundTypeId bgTypeI
|
||||
{
|
||||
if (!isAnyArenaEnabled()) // it's checked in handler but just to be sure
|
||||
return NULL;
|
||||
uint8 size = m_EnabledArenas.size() - 1;
|
||||
uint8 size = m_EnabledArenas.size() - 1;
|
||||
bgTypeId = m_EnabledArenas[urand(0,size)];
|
||||
bg_template = GetBattleGroundTemplate(bgTypeId);
|
||||
if (!bg_template)
|
||||
@@ -1781,7 +1781,7 @@ void BattleGroundMgr::InitAutomaticArenaPointDistribution()
|
||||
{
|
||||
sLog.outDebug("Initializing Automatic Arena Point Distribution");
|
||||
uint64 wstime = sWorld.getWorldState(WS_ARENA_DISTRIBUTION_TIME);
|
||||
|
||||
|
||||
if (!wstime)
|
||||
{
|
||||
sLog.outDebug("Battleground: Next arena point distribution time not found, reseting it now.");
|
||||
|
||||
+22
-22
@@ -52,7 +52,7 @@ void BattleGroundSA::Reset()
|
||||
|
||||
bool BattleGroundSA::SetupBattleGround()
|
||||
{
|
||||
return ResetObjs();
|
||||
return ResetObjs();
|
||||
}
|
||||
|
||||
bool BattleGroundSA::ResetObjs()
|
||||
@@ -66,7 +66,7 @@ bool BattleGroundSA::ResetObjs()
|
||||
|
||||
for(uint8 i = 0; i < BG_SA_MAXNPC; i++)
|
||||
DelCreature(i);
|
||||
|
||||
|
||||
for(uint8 i = BG_SA_MAXNPC; i < BG_SA_MAXNPC + BG_SA_MAX_GY; i++)
|
||||
DelCreature(i);
|
||||
|
||||
@@ -93,7 +93,7 @@ bool BattleGroundSA::ResetObjs()
|
||||
}
|
||||
|
||||
OverrideGunFaction();
|
||||
|
||||
|
||||
for(uint8 i = 0; i <= BG_SA_TITAN_RELIC; i++)
|
||||
{
|
||||
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
|
||||
@@ -125,7 +125,7 @@ bool BattleGroundSA::ResetObjs()
|
||||
{
|
||||
sLog.outError("SOTA: Can't find GY entry %u",BG_SA_GYEntries[i]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(i == BG_SA_BEACH_GY)
|
||||
{
|
||||
@@ -143,7 +143,7 @@ bool BattleGroundSA::ResetObjs()
|
||||
//GY capture points
|
||||
for(uint8 i = BG_SA_CENTRAL_FLAG; i < BG_SA_MAXOBJ; i++)
|
||||
{
|
||||
AddObject(i, BG_SA_ObjEntries[i] - (attackers == TEAM_ALLIANCE ? 1:0),
|
||||
AddObject(i, BG_SA_ObjEntries[i] - (attackers == TEAM_ALLIANCE ? 1:0),
|
||||
BG_SA_ObjSpawnlocs[i][0], BG_SA_ObjSpawnlocs[i][1],
|
||||
BG_SA_ObjSpawnlocs[i][2], BG_SA_ObjSpawnlocs[i][3],
|
||||
0,0,0,0,RESPAWN_ONE_DAY);
|
||||
@@ -154,21 +154,21 @@ bool BattleGroundSA::ResetObjs()
|
||||
UpdateWorldState(BG_SA_RIGHT_GY_HORDE , GraveyardStatus[BG_SA_RIGHT_CAPTURABLE_GY] == TEAM_HORDE?1:0 );
|
||||
UpdateWorldState(BG_SA_LEFT_GY_HORDE , GraveyardStatus[BG_SA_LEFT_CAPTURABLE_GY] == TEAM_HORDE?1:0 );
|
||||
UpdateWorldState(BG_SA_CENTER_GY_HORDE , GraveyardStatus[BG_SA_CENTRAL_CAPTURABLE_GY] == TEAM_HORDE?1:0 );
|
||||
|
||||
|
||||
UpdateWorldState(BG_SA_RIGHT_GY_ALLIANCE , GraveyardStatus[BG_SA_RIGHT_CAPTURABLE_GY] == TEAM_ALLIANCE?1:0 );
|
||||
UpdateWorldState(BG_SA_LEFT_GY_ALLIANCE , GraveyardStatus[BG_SA_LEFT_CAPTURABLE_GY] == TEAM_ALLIANCE?1:0 );
|
||||
UpdateWorldState(BG_SA_CENTER_GY_ALLIANCE , GraveyardStatus[BG_SA_CENTRAL_CAPTURABLE_GY] == TEAM_ALLIANCE?1:0 );
|
||||
|
||||
|
||||
if(attackers == TEAM_ALLIANCE)
|
||||
{
|
||||
UpdateWorldState(BG_SA_ALLY_ATTACKS, 1);
|
||||
UpdateWorldState(BG_SA_HORDE_ATTACKS, 0);
|
||||
|
||||
|
||||
UpdateWorldState(BG_SA_RIGHT_ATT_TOKEN_ALL, 1);
|
||||
UpdateWorldState(BG_SA_LEFT_ATT_TOKEN_ALL, 1);
|
||||
UpdateWorldState(BG_SA_RIGHT_ATT_TOKEN_HRD, 0);
|
||||
UpdateWorldState(BG_SA_LEFT_ATT_TOKEN_HRD, 0);
|
||||
|
||||
|
||||
UpdateWorldState(BG_SA_HORDE_DEFENCE_TOKEN,1);
|
||||
UpdateWorldState(BG_SA_ALLIANCE_DEFENCE_TOKEN,0);
|
||||
}
|
||||
@@ -176,7 +176,7 @@ bool BattleGroundSA::ResetObjs()
|
||||
{
|
||||
UpdateWorldState(BG_SA_HORDE_ATTACKS, 1);
|
||||
UpdateWorldState(BG_SA_ALLY_ATTACKS, 0);
|
||||
|
||||
|
||||
UpdateWorldState(BG_SA_RIGHT_ATT_TOKEN_ALL, 0);
|
||||
UpdateWorldState(BG_SA_LEFT_ATT_TOKEN_ALL, 0);
|
||||
UpdateWorldState(BG_SA_RIGHT_ATT_TOKEN_HRD, 1);
|
||||
@@ -192,7 +192,7 @@ bool BattleGroundSA::ResetObjs()
|
||||
UpdateWorldState(BG_SA_GREEN_GATEWS, 1);
|
||||
UpdateWorldState(BG_SA_YELLOW_GATEWS, 1);
|
||||
UpdateWorldState(BG_SA_ANCIENT_GATEWS, 1);
|
||||
|
||||
|
||||
TeleportPlayers();
|
||||
return true;
|
||||
}
|
||||
@@ -265,7 +265,7 @@ void BattleGroundSA::Update(uint32 diff)
|
||||
{
|
||||
RoundScores[1].time = TotalTime;
|
||||
RoundScores[1].winner = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
|
||||
|
||||
|
||||
if (RoundScores[0].time == RoundScores[1].time)
|
||||
EndBattleGround(NULL);
|
||||
else if(RoundScores[0].time < RoundScores[1].time)
|
||||
@@ -339,12 +339,12 @@ void BattleGroundSA::AddPlayer(Player *plr)
|
||||
if(plr->GetTeamId() == attackers)
|
||||
{
|
||||
plr->CastSpell(plr,12438,true);//Without this player falls before boat loads...
|
||||
|
||||
|
||||
if(urand(0,1))
|
||||
plr->TeleportTo(607, 2682.936f, -830.368f, 50.0f, 2.895f, 0);
|
||||
else
|
||||
plr->TeleportTo(607, 2577.003f, 980.261f, 50.0f, 0.807f, 0);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
plr->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0);
|
||||
@@ -408,11 +408,11 @@ void BattleGroundSA::TeleportPlayers()
|
||||
if(plr->GetTeamId() == attackers)
|
||||
{
|
||||
plr->CastSpell(plr,12438,true); //Without this player falls before boat loads...
|
||||
|
||||
|
||||
if(urand(0,1))
|
||||
plr->TeleportTo(607, 2682.936f, -830.368f, 50.0f, 2.895f, 0);
|
||||
else
|
||||
plr->TeleportTo(607, 2577.003f, 980.261f, 50.0f, 0.807f, 0);
|
||||
plr->TeleportTo(607, 2577.003f, 980.261f, 50.0f, 0.807f, 0);
|
||||
}
|
||||
else
|
||||
plr->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0);
|
||||
@@ -464,13 +464,13 @@ void BattleGroundSA::OverrideGunFaction()
|
||||
{
|
||||
if(!m_BgCreatures[0])
|
||||
return;
|
||||
|
||||
|
||||
for(uint8 i = BG_SA_GUN_1; i <= BG_SA_GUN_10;i++)
|
||||
{
|
||||
if(Creature* gun = GetBGCreature(i))
|
||||
gun->setFaction(BG_SA_Factions[attackers? TEAM_ALLIANCE : TEAM_HORDE]);
|
||||
}
|
||||
|
||||
|
||||
for(uint8 i = BG_SA_DEMOLISHER_1; i <= BG_SA_DEMOLISHER_4;i++)
|
||||
{
|
||||
if(Creature* dem = GetBGCreature(i))
|
||||
@@ -513,7 +513,7 @@ void BattleGroundSA::DestroyGate(uint32 i, Player* pl)
|
||||
ASSERT(false);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if(i < 5)
|
||||
DelObject(i+9);
|
||||
UpdateWorldState(uws, GateStatus[i]);
|
||||
@@ -598,7 +598,7 @@ void BattleGroundSA::CaptureGraveyard(BG_SA_Graveyards i)
|
||||
case BG_SA_LEFT_CAPTURABLE_GY:
|
||||
SpawnBGObject(BG_SA_LEFT_FLAG,RESPAWN_ONE_DAY);
|
||||
npc = BG_SA_NPC_RIGSPARK;
|
||||
AddCreature(BG_SA_NpcEntries[npc], npc, attackers,
|
||||
AddCreature(BG_SA_NpcEntries[npc], npc, attackers,
|
||||
BG_SA_NpcSpawnlocs[npc][0], BG_SA_NpcSpawnlocs[npc][1],
|
||||
BG_SA_NpcSpawnlocs[npc][2], BG_SA_NpcSpawnlocs[npc][3]);
|
||||
UpdateWorldState(BG_SA_LEFT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE? 1:0));
|
||||
@@ -607,7 +607,7 @@ void BattleGroundSA::CaptureGraveyard(BG_SA_Graveyards i)
|
||||
case BG_SA_RIGHT_CAPTURABLE_GY:
|
||||
SpawnBGObject(BG_SA_RIGHT_FLAG, RESPAWN_ONE_DAY);
|
||||
npc = BG_SA_NPC_SPARKLIGHT;
|
||||
AddCreature(BG_SA_NpcEntries[npc], npc, attackers,
|
||||
AddCreature(BG_SA_NpcEntries[npc], npc, attackers,
|
||||
BG_SA_NpcSpawnlocs[npc][0], BG_SA_NpcSpawnlocs[npc][1],
|
||||
BG_SA_NpcSpawnlocs[npc][2], BG_SA_NpcSpawnlocs[npc][3]);
|
||||
UpdateWorldState(BG_SA_RIGHT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE? 1:0));
|
||||
@@ -668,7 +668,7 @@ void BattleGroundSA::EndBattleGround(uint32 winner)
|
||||
RewardHonorToTeam(GetBonusHonorFromKill(1), ALLIANCE);
|
||||
else if (winner == HORDE)
|
||||
RewardHonorToTeam(GetBonusHonorFromKill(1), HORDE);
|
||||
|
||||
|
||||
//complete map_end rewards (even if no team wins)
|
||||
RewardHonorToTeam(GetBonusHonorFromKill(2), ALLIANCE);
|
||||
RewardHonorToTeam(GetBonusHonorFromKill(2), HORDE);
|
||||
|
||||
+16
-16
@@ -61,14 +61,14 @@ enum BG_SA_WorldStates
|
||||
BG_SA_TIMER_SEC_DECS = 3561,
|
||||
BG_SA_ALLY_ATTACKS = 4352,
|
||||
BG_SA_HORDE_ATTACKS = 4353,
|
||||
|
||||
|
||||
BG_SA_PURPLE_GATEWS = 3614,
|
||||
BG_SA_RED_GATEWS = 3617,
|
||||
BG_SA_BLUE_GATEWS = 3620,
|
||||
BG_SA_GREEN_GATEWS = 3623,
|
||||
BG_SA_YELLOW_GATEWS = 3638,
|
||||
BG_SA_ANCIENT_GATEWS = 3849,
|
||||
|
||||
|
||||
|
||||
BG_SA_LEFT_GY_ALLIANCE = 3635,
|
||||
BG_SA_RIGHT_GY_ALLIANCE = 3636,
|
||||
@@ -112,7 +112,7 @@ enum BG_SA_NPCs
|
||||
BG_SA_MAXNPC
|
||||
};
|
||||
|
||||
const uint32 BG_SA_NpcEntries[BG_SA_MAXNPC] =
|
||||
const uint32 BG_SA_NpcEntries[BG_SA_MAXNPC] =
|
||||
{
|
||||
27894,
|
||||
27894,
|
||||
@@ -134,18 +134,18 @@ const uint32 BG_SA_NpcEntries[BG_SA_MAXNPC] =
|
||||
29262,
|
||||
};
|
||||
|
||||
const float BG_SA_NpcSpawnlocs[BG_SA_MAXNPC][4] =
|
||||
const float BG_SA_NpcSpawnlocs[BG_SA_MAXNPC][4] =
|
||||
{
|
||||
//Cannons
|
||||
{ 1436.429f, 110.05f, 41.407f, 5.4f },
|
||||
{ 1436.429f, 110.05f, 41.407f, 5.4f },
|
||||
{ 1404.9023f, 84.758f, 41.183f, 5.46f },
|
||||
{ 1068.693f, -86.951f, 93.81f, 0.02f },
|
||||
{ 1068.693f, -86.951f, 93.81f, 0.02f },
|
||||
{ 1068.83f, -127.56f, 96.45f, 0.0912f },
|
||||
{ 1422.115f, -196.433f, 42.1825f, 1.0222f },
|
||||
{ 1422.115f, -196.433f, 42.1825f, 1.0222f },
|
||||
{ 1454.887f, -220.454f, 41.956f, 0.9627f },
|
||||
{ 1232.345f, -187.517f, 66.945f, 0.45f },
|
||||
{ 1232.345f, -187.517f, 66.945f, 0.45f },
|
||||
{ 1249.634f, -224.189f, 66.72f, 0.635f },
|
||||
{ 1236.213f, 92.287f, 64.965f, 5.751f },
|
||||
{ 1236.213f, 92.287f, 64.965f, 5.751f },
|
||||
{ 1215.11f, 57.772f, 64.739f, 5.78f } ,
|
||||
//Demolishers
|
||||
{ 1611.597656,-117.270073,8.719355,2.513274},
|
||||
@@ -182,7 +182,7 @@ enum BG_SA_Objects
|
||||
BG_SA_MAXOBJ
|
||||
};
|
||||
|
||||
const float BG_SA_ObjSpawnlocs[BG_SA_MAXOBJ][4] =
|
||||
const float BG_SA_ObjSpawnlocs[BG_SA_MAXOBJ][4] =
|
||||
{
|
||||
{ 1411.57f, 108.163f, 28.692f, 5.441f },
|
||||
{ 1055.452f, -108.1f, 82.134f, 0.034f },
|
||||
@@ -234,17 +234,17 @@ const uint32 BG_SA_ObjEntries[BG_SA_MAXOBJ] =
|
||||
192834,
|
||||
193182,
|
||||
193185,
|
||||
192687,
|
||||
192685,
|
||||
192689,
|
||||
192690,
|
||||
192687,
|
||||
192685,
|
||||
192689,
|
||||
192690,
|
||||
192691,
|
||||
191311,
|
||||
191311,
|
||||
191311,
|
||||
191310,
|
||||
191306,
|
||||
191308,
|
||||
191308,
|
||||
};
|
||||
|
||||
const uint32 BG_SA_Factions[2] =
|
||||
@@ -333,7 +333,7 @@ class BattleGroundSA : public BattleGround
|
||||
BG_SA_GateState GateStatus[6];
|
||||
BG_SA_Status status;
|
||||
TeamId GraveyardStatus[BG_SA_MAX_GY];
|
||||
BG_SA_RoundScore RoundScores[2];
|
||||
BG_SA_RoundScore RoundScores[2];
|
||||
bool TimerEnabled;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -258,7 +258,7 @@ void TurretAI::UpdateAI(const uint32 diff)
|
||||
|
||||
AOEAI::AOEAI(Creature *c) : CreatureAI(c)
|
||||
{
|
||||
ASSERT(me->m_spells[0]);
|
||||
ASSERT(me->m_spells[0]);
|
||||
me->SetVisibility(VISIBILITY_ON);//visible to see all spell anims
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);//can't be targeted
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_1);//can't be damaged
|
||||
|
||||
+2
-2
@@ -529,7 +529,7 @@ class Creature : public Unit, public GridObject<Creature>
|
||||
bool lootForPickPocketed;
|
||||
bool lootForBody;
|
||||
Player *GetLootRecipient() const;
|
||||
bool hasLootRecipient() const { return m_lootRecipient != 0; }
|
||||
bool hasLootRecipient() const { return m_lootRecipient != 0; }
|
||||
bool isTappedBy(Player *player) const; // return true if the creature is tapped by the player or a member of his party.
|
||||
|
||||
void SetLootRecipient (Unit* unit);
|
||||
@@ -638,7 +638,7 @@ class Creature : public Unit, public GridObject<Creature>
|
||||
|
||||
void SetDisableReputationGain(bool disable) { DisableReputationGain = disable; }
|
||||
bool IsReputationGainDisabled() { return DisableReputationGain; }
|
||||
bool IsDamageEnoughForLootingAndReward() const { return m_PlayerDamageReq == 0; }
|
||||
bool IsDamageEnoughForLootingAndReward() const { return m_PlayerDamageReq == 0; }
|
||||
void LowerPlayerDamageReq(uint32 unDamage)
|
||||
{
|
||||
if(m_PlayerDamageReq)
|
||||
|
||||
@@ -107,7 +107,7 @@ void CreatureAI::DoZoneInCombat(Creature* creature)
|
||||
// scripts does not take care about MoveInLineOfSight loops
|
||||
// MoveInLineOfSight can be called inside another MoveInLineOfSight and cause stack overflow
|
||||
void CreatureAI::MoveInLineOfSight_Safe(Unit *who)
|
||||
{
|
||||
{
|
||||
if(m_MoveInLineOfSight_locked == true)
|
||||
return;
|
||||
m_MoveInLineOfSight_locked = true;
|
||||
|
||||
@@ -582,13 +582,13 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||
{
|
||||
m_creature->addUnitState(UNIT_STAT_MELEE_ATTACKING);
|
||||
m_creature->SendMeleeAttackStart(victim);
|
||||
}
|
||||
}
|
||||
if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == IDLE_MOTION_TYPE)
|
||||
m_creature->GetMotionMaster()->MoveChase(victim, AttackDistance, AttackAngle); // Targeted movement generator will start melee automatically, no need to send it explicitly
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
if (m_creature->isInCombat())
|
||||
{
|
||||
Unit* victim = m_creature->getVictim();
|
||||
@@ -596,7 +596,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||
{
|
||||
m_creature->clearUnitState(UNIT_STAT_MELEE_ATTACKING);
|
||||
m_creature->SendMeleeAttackStop(victim);
|
||||
}
|
||||
}
|
||||
if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE)
|
||||
m_creature->GetMotionMaster()->MoveIdle();
|
||||
}
|
||||
|
||||
@@ -337,7 +337,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
if (entry->bracketId > MAX_BATTLEGROUND_BRACKETS)
|
||||
assert(false && "Need update MAX_BATTLEGROUND_BRACKETS by DBC data");
|
||||
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sQuestXPStore, dbcPath,"QuestXP.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sQuestXPStore, dbcPath,"QuestXP.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sQuestFactionRewardStore, dbcPath,"QuestFactionReward.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sRandomPropertiesPointsStore, dbcPath,"RandPropPoints.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sScalingStatDistributionStore, dbcPath,"ScalingStatDistribution.dbc");
|
||||
|
||||
@@ -1487,7 +1487,7 @@ struct SpellEntry
|
||||
//float unk_320_4[3]; // 235-237 3.2.0
|
||||
//uint32 spellDescriptionVariableID; // 238 3.2.0
|
||||
//uint32 SpellDifficultyId; // 239 3.3.0
|
||||
/*
|
||||
/*
|
||||
flag96 EffectSpellClassMask[MAX_SPELL_EFFECTS]; // 127-136
|
||||
uint32 SpellVisual[2]; // 137-138 m_spellVisualID
|
||||
uint32 SpellIconID; // 139 m_spellIconID
|
||||
|
||||
@@ -92,7 +92,7 @@ bool DynamicObject::Create(uint32 guidlow, Unit *caster, uint32 spellId, const P
|
||||
// The lower word of DYNAMICOBJECT_BYTES must be 0x0001. This value means that the visual radius will be overriden
|
||||
// by client for most of the "ground patch" visual effect spells and a few "skyfall" ones like Hurricane.
|
||||
// If any other value is used, the client will _always_ use the radius provided in DYNAMICOBJECT_RADIUS, but
|
||||
// precompensation is necessary (eg radius *= 2) for many spells. Anyway, blizz sends 0x0001 for all the spells
|
||||
// precompensation is necessary (eg radius *= 2) for many spells. Anyway, blizz sends 0x0001 for all the spells
|
||||
// I saw sniffed...
|
||||
SetUInt32Value( DYNAMICOBJECT_BYTES, 0x00000001 );
|
||||
SetUInt32Value( DYNAMICOBJECT_SPELLID, spellId );
|
||||
@@ -166,7 +166,7 @@ int32 DynamicObject::GetDuration() const
|
||||
if (!m_aura)
|
||||
return m_duration;
|
||||
else
|
||||
return m_aura->GetDuration();
|
||||
return m_aura->GetDuration();
|
||||
}
|
||||
|
||||
void DynamicObject::SetDuration(int32 newDuration)
|
||||
|
||||
+9
-9
@@ -565,10 +565,10 @@ void Group::SendLooter(Creature *pCreature, Player *pLooter)
|
||||
{
|
||||
assert(pCreature);
|
||||
|
||||
WorldPacket data(SMSG_LOOT_LIST, (8+8));
|
||||
WorldPacket data(SMSG_LOOT_LIST, (8+8));
|
||||
data << uint64(pCreature->GetGUID());
|
||||
data << uint8(0); // unk1
|
||||
|
||||
|
||||
if (pLooter)
|
||||
data.append(pLooter->GetPackGUID());
|
||||
else
|
||||
@@ -628,12 +628,12 @@ void Group::GroupLoot(Loot *loot, WorldObject* pLootedObject)
|
||||
|
||||
RollId.push_back(r);
|
||||
|
||||
if (Creature* creature = dynamic_cast<Creature *>(pLootedObject))
|
||||
if (Creature* creature = dynamic_cast<Creature *>(pLootedObject))
|
||||
{
|
||||
creature->m_groupLootTimer = 60000;
|
||||
creature->lootingGroupLeaderGUID = GetLeaderGUID();
|
||||
}
|
||||
else if (GameObject* go = dynamic_cast<GameObject *>(pLootedObject))
|
||||
else if (GameObject* go = dynamic_cast<GameObject *>(pLootedObject))
|
||||
{
|
||||
go->m_groupLootTimer = 60000;
|
||||
go->lootingGroupLeaderGUID = GetLeaderGUID();
|
||||
@@ -693,7 +693,7 @@ void Group::NeedBeforeGreed(Loot *loot, WorldObject* pLootedObject)
|
||||
|
||||
RollId.push_back(r);
|
||||
|
||||
if (Creature* creature = dynamic_cast<Creature *>(pLootedObject))
|
||||
if (Creature* creature = dynamic_cast<Creature *>(pLootedObject))
|
||||
{
|
||||
creature->m_groupLootTimer = 60000;
|
||||
creature->lootingGroupLeaderGUID = GetLeaderGUID();
|
||||
@@ -924,7 +924,7 @@ void Group::CountTheRoll(Rolls::iterator rollI, uint32 NumberOfPlayers)
|
||||
|
||||
// remove is_blocked so that the item is lootable by all players
|
||||
LootItem *item = &(roll->getLoot()->items[roll->itemSlot]);
|
||||
if (item)
|
||||
if (item)
|
||||
item->is_blocked = false;
|
||||
}
|
||||
RollId.erase(rollI);
|
||||
@@ -1022,7 +1022,7 @@ void Group::SendUpdate()
|
||||
if (citr->guid == citr2->guid)
|
||||
continue;
|
||||
Player* member = objmgr.GetPlayer(citr2->guid);
|
||||
|
||||
|
||||
uint8 onlineState = (member) ? MEMBER_STATUS_ONLINE : MEMBER_STATUS_OFFLINE;
|
||||
onlineState = onlineState | ((isBGGroup()) ? MEMBER_STATUS_PVP : 0);
|
||||
|
||||
@@ -1334,7 +1334,7 @@ bool Group::_setMainTank(const uint64 &guid, const bool &apply)
|
||||
|
||||
RemoveUniqueGroupMemberFlag(MEMBER_FLAG_MAINTANK); // Remove main tank flag from current if any.
|
||||
ToggleGroupMemberFlag(slot, MEMBER_FLAG_MAINTANK, apply); // And apply main tank flag on new main tank.
|
||||
|
||||
|
||||
if(!isBGGroup())
|
||||
CharacterDatabase.PExecute("UPDATE group_member SET memberFlags='%u' WHERE memberGuid='%u'", slot->flags, GUID_LOPART(guid));
|
||||
return true;
|
||||
@@ -1412,7 +1412,7 @@ void Group::ChangeMembersGroup(Player *player, const uint8 &group)
|
||||
// If the RR player is not yet set for the group, the first group member becomes the round-robin player.
|
||||
// If the RR player is set, the next player in group becomes the round-robin player.
|
||||
//
|
||||
// If ifneed is true,
|
||||
// If ifneed is true,
|
||||
// the current RR player is checked to be near the looted object.
|
||||
// if yes, no update done.
|
||||
// if not, he looses his turn.
|
||||
|
||||
+2
-2
@@ -234,7 +234,7 @@ bool Guild::LoadGuildFromDB(QueryResult_AutoPtr guildDataResult)
|
||||
}
|
||||
|
||||
bool Guild::CheckGuildStructure()
|
||||
{
|
||||
{
|
||||
// Repair the structure of guild
|
||||
// If the guildmaster doesn't exist or isn't the member of guild
|
||||
// attempt to promote another member
|
||||
@@ -359,7 +359,7 @@ bool Guild::LoadMembersFromDB(QueryResult_AutoPtr guildMembersResult)
|
||||
if (guildId > m_Id)
|
||||
//we loaded all members for this guild already, break cycle
|
||||
break;
|
||||
|
||||
|
||||
MemberSlot newmember;
|
||||
uint64 guid = MAKE_NEW_GUID(fields[1].GetUInt32(), 0, HIGHGUID_PLAYER);
|
||||
newmember.RankId = fields[2].GetUInt32();
|
||||
|
||||
@@ -675,7 +675,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b
|
||||
|
||||
SetResetTimeFor(mapid, difficulty, next_reset);
|
||||
ScheduleReset(true, time_t(next_reset-3600), InstResetEvent(1, mapid, difficulty, -1));
|
||||
|
||||
|
||||
// update it in the DB
|
||||
CharacterDatabase.PExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%d' AND difficulty = '%d'", next_reset, mapid, difficulty);
|
||||
}
|
||||
|
||||
+11
-11
@@ -248,7 +248,7 @@ Item::Item( )
|
||||
m_lootGenerated = false;
|
||||
mb_in_trade = false;
|
||||
m_lastPlayedTimeUpdate = time(NULL);
|
||||
|
||||
|
||||
m_refundRecipient = 0;
|
||||
m_paidMoney = 0;
|
||||
m_paidExtendedCost = 0;
|
||||
@@ -277,7 +277,7 @@ bool Item::Create( uint32 guidlow, uint32 itemid, Player const* owner)
|
||||
|
||||
SetUInt32Value(ITEM_FIELD_FLAGS, itemProto->Flags);
|
||||
SetUInt32Value(ITEM_FIELD_DURATION, abs(itemProto->Duration));
|
||||
|
||||
|
||||
SetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME, 0);
|
||||
|
||||
return true;
|
||||
@@ -418,7 +418,7 @@ bool Item::LoadFromDB(uint32 guid, uint64 owner_guid, QueryResult_AutoPtr result
|
||||
SetOwnerGUID(owner_guid);
|
||||
need_save = true;
|
||||
}
|
||||
|
||||
|
||||
if (need_save) // normal item changed state set not work at loading
|
||||
{
|
||||
std::ostringstream ss;
|
||||
@@ -638,7 +638,7 @@ void Item::SetState(ItemUpdateState state, Player *forplayer)
|
||||
// new items must stay in new state until saved
|
||||
if (uState != ITEM_NEW)
|
||||
uState = state;
|
||||
|
||||
|
||||
AddToUpdateQueueOf(forplayer);
|
||||
}
|
||||
else
|
||||
@@ -748,8 +748,8 @@ uint32 Item::GetEnchantRequiredLevel() const
|
||||
if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id))
|
||||
if (enchantEntry->requiredLevel > level)
|
||||
level = enchantEntry->requiredLevel;
|
||||
|
||||
return level;
|
||||
|
||||
return level;
|
||||
}
|
||||
|
||||
bool Item::IsBoundByEnchant() const
|
||||
@@ -834,7 +834,7 @@ void Item::SetEnchantmentDuration(EnchantmentSlot slot, uint32 duration, Player*
|
||||
return;
|
||||
|
||||
SetUInt32Value(ITEM_FIELD_ENCHANTMENT_1_1 + slot*MAX_ENCHANTMENT_OFFSET + ENCHANTMENT_DURATION_OFFSET,duration);
|
||||
SetState(ITEM_CHANGED, owner);
|
||||
SetState(ITEM_CHANGED, owner);
|
||||
// Cannot use GetOwner() here, has to be passed as an argument to avoid freeze due to hashtable locking
|
||||
}
|
||||
|
||||
@@ -1061,7 +1061,7 @@ void Item::SaveRefundDataToDB()
|
||||
ss << GetPaidMoney() << ",";
|
||||
ss << GetPaidExtendedCost();
|
||||
ss << ")";
|
||||
|
||||
|
||||
CharacterDatabase.Execute(ss.str().c_str());
|
||||
}
|
||||
|
||||
@@ -1079,12 +1079,12 @@ void Item::SetNotRefundable(Player *owner, bool changestate)
|
||||
// Following is not applicable in the trading procedure
|
||||
if (changestate)
|
||||
SetState(ITEM_CHANGED, owner);
|
||||
|
||||
|
||||
SetRefundRecipient(0);
|
||||
SetPaidMoney(0);
|
||||
SetPaidExtendedCost(0);
|
||||
DeleteRefundDataFromDB();
|
||||
|
||||
DeleteRefundDataFromDB();
|
||||
|
||||
owner->DeleteRefundReference(GetGUID());
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -330,11 +330,11 @@ class Item : public Object
|
||||
uint32 GetRefundRecipient() { return m_refundRecipient; }
|
||||
uint32 GetPaidMoney() { return m_paidMoney; }
|
||||
uint32 GetPaidExtendedCost() { return m_paidExtendedCost; }
|
||||
|
||||
|
||||
void UpdatePlayedTime(Player *owner);
|
||||
uint32 GetPlayedTime();
|
||||
bool IsRefundExpired();
|
||||
|
||||
|
||||
void BuildUpdate(UpdateDataMapType& );
|
||||
|
||||
private:
|
||||
|
||||
+10
-10
@@ -1361,13 +1361,13 @@ void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recv_data)
|
||||
|
||||
// This function call unsets ITEM_FLAGS_REFUNDABLE if played time is over 2 hours.
|
||||
item->UpdatePlayedTime(GetPlayer());
|
||||
|
||||
|
||||
if (!item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_REFUNDABLE))
|
||||
{
|
||||
sLog.outDebug("Item refund: item not refundable!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (GetPlayer()->GetGUIDLow() != item->GetRefundRecipient()) // Formerly refundable item got traded
|
||||
{
|
||||
sLog.outDebug("Item refund: item was traded!");
|
||||
@@ -1381,7 +1381,7 @@ void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recv_data)
|
||||
sLog.outDebug("Item refund: cannot find extendedcost data.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
WorldPacket data(SMSG_ITEM_REFUND_INFO_RESPONSE, 8+4+4+4+4*4+4*4+4+4);
|
||||
data << uint64(guid); // item guid
|
||||
data << uint32(item->GetPaidMoney()); // money cost
|
||||
@@ -1432,14 +1432,14 @@ void WorldSession::HandleItemRefund(WorldPacket &recv_data)
|
||||
item->SetNotRefundable(GetPlayer());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(item->GetPaidExtendedCost());
|
||||
if (!iece)
|
||||
{
|
||||
sLog.outDebug("Item refund: cannot find extendedcost data.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
uint32 moneyRefund = item->GetPaidMoney();
|
||||
|
||||
bool store_error = false;
|
||||
@@ -1447,7 +1447,7 @@ void WorldSession::HandleItemRefund(WorldPacket &recv_data)
|
||||
{
|
||||
uint32 count = iece->reqitemcount[i];
|
||||
uint32 itemid = iece->reqitem[i];
|
||||
|
||||
|
||||
if (count && itemid)
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
@@ -1457,9 +1457,9 @@ void WorldSession::HandleItemRefund(WorldPacket &recv_data)
|
||||
store_error = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (store_error)
|
||||
{
|
||||
WorldPacket data(SMSG_ITEM_REFUND_RESULT, 8+4);
|
||||
@@ -1487,7 +1487,7 @@ void WorldSession::HandleItemRefund(WorldPacket &recv_data)
|
||||
|
||||
// Destroy item
|
||||
_player->DestroyItem(item->GetBagSlot(), item->GetSlot(), true);
|
||||
|
||||
|
||||
// Grant back extendedcost items
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
{
|
||||
@@ -1502,7 +1502,7 @@ void WorldSession::HandleItemRefund(WorldPacket &recv_data)
|
||||
_player->SendNewItem(it, count, true, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Grant back money
|
||||
if (moneyRefund)
|
||||
_player->ModifyMoney(moneyRefund);
|
||||
|
||||
+4
-4
@@ -1461,7 +1461,7 @@ bool ChatHandler::HandleAccountSetGmLevelCommand(const char *args)
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// Check and abort if the target gm has a higher rank on one of the realms and the new realm is -1
|
||||
if (gmRealmID == -1)
|
||||
{
|
||||
@@ -1487,7 +1487,7 @@ bool ChatHandler::HandleAccountSetGmLevelCommand(const char *args)
|
||||
loginDatabase.PExecute("DELETE FROM account_access WHERE id = '%u'", targetAccountId);
|
||||
else
|
||||
loginDatabase.PExecute("DELETE FROM account_access WHERE id = '%u' AND (RealmID = '%d' OR RealmID = '-1')", targetAccountId, realmID);
|
||||
|
||||
|
||||
if (gm != 0)
|
||||
loginDatabase.PExecute("INSERT INTO account_access VALUES ('%u','%d','%d')", targetAccountId, gm, realmID);
|
||||
PSendSysMessage(LANG_YOU_CHANGE_SECURITY, targetAccountName.c_str(), gm);
|
||||
@@ -5361,7 +5361,7 @@ bool ChatHandler::HandleResetAllCommand(const char * args)
|
||||
}
|
||||
|
||||
CharacterDatabase.PExecute("UPDATE characters SET at_login = at_login | '%u' WHERE (at_login & '%u') = '0'",atLogin,atLogin);
|
||||
|
||||
|
||||
ObjectAccessor::Guard guard(*HashMapHolder<Player>::GetLock());
|
||||
HashMapHolder<Player>::MapType const& plist = ObjectAccessor::Instance().GetPlayers();
|
||||
for (HashMapHolder<Player>::MapType::const_iterator itr = plist.begin(); itr != plist.end(); ++itr)
|
||||
@@ -6867,7 +6867,7 @@ bool ChatHandler::HandleInstanceSaveDataCommand(const char * /*args*/)
|
||||
bool ChatHandler::HandleGMListFullCommand(const char* /*args*/)
|
||||
{
|
||||
///- Get the accounts with GM Level >0
|
||||
QueryResult_AutoPtr result = loginDatabase.Query("SELECT a.username,aa.gmlevel FROM account a, account_access aa WHERE a.id=aa.id AND aa.gmlevel > 0");
|
||||
QueryResult_AutoPtr result = loginDatabase.Query("SELECT a.username,aa.gmlevel FROM account a, account_access aa WHERE a.id=aa.id AND aa.gmlevel > 0");
|
||||
if(result)
|
||||
{
|
||||
SendSysMessage(LANG_GMLIST);
|
||||
|
||||
@@ -445,7 +445,7 @@ void WorldSession::DoLootRelease(uint64 lguid)
|
||||
pCreature->SetLootRecipient(NULL);
|
||||
loot->clear();
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
// if the round robin player release, reset it.
|
||||
if (player->GetGUID() == loot->roundRobinPlayer)
|
||||
|
||||
@@ -784,7 +784,7 @@ ByteBuffer& operator<<(ByteBuffer& b, LootView const& lv)
|
||||
slot_type = LOOT_SLOT_TYPE_ROLL_ONGOING;
|
||||
else if (l.roundRobinPlayer == 0 || !l.items[i].is_underthreshold || lv.viewer->GetGUID() == l.roundRobinPlayer)
|
||||
{
|
||||
// no round robin owner or he has released the loot
|
||||
// no round robin owner or he has released the loot
|
||||
// or it IS the round robin group owner
|
||||
// => item is lootable
|
||||
slot_type = LOOT_SLOT_TYPE_ALLOW_LOOT;
|
||||
|
||||
+1
-1
@@ -360,7 +360,7 @@ void
|
||||
Map::EnsureGridLoadedAtEnter(const Cell &cell, Player *player)
|
||||
{
|
||||
EnsureGridLoaded(cell);
|
||||
NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
|
||||
NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
|
||||
assert( grid != NULL );
|
||||
|
||||
if (player)
|
||||
|
||||
@@ -564,7 +564,7 @@ void WorldSession::HandleDismissControlledVehicle(WorldPacket &recv_data)
|
||||
|
||||
_player->m_movementInfo = mi;
|
||||
|
||||
/*
|
||||
/*
|
||||
ReadMovementInfo(recv_data, &_player->m_mover->m_movementInfo);*/
|
||||
_player->ExitVehicle();
|
||||
}
|
||||
@@ -574,7 +574,7 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data)
|
||||
sLog.outDebug("WORLD: Recvd CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE");
|
||||
recv_data.hexlike();
|
||||
|
||||
Unit* vehicle_base = GetPlayer()->GetVehicleBase();
|
||||
Unit* vehicle_base = GetPlayer()->GetVehicleBase();
|
||||
if(!vehicle_base)
|
||||
return;
|
||||
|
||||
|
||||
+9
-9
@@ -397,9 +397,9 @@ struct Position
|
||||
void GetPosition(float &x, float &y, float &z, float &o) const
|
||||
{ x = m_positionX; y = m_positionY; z = m_positionZ; o = m_orientation; }
|
||||
void GetPosition(Position *pos) const
|
||||
{
|
||||
if (pos)
|
||||
pos->Relocate(m_positionX, m_positionY, m_positionZ, m_orientation);
|
||||
{
|
||||
if (pos)
|
||||
pos->Relocate(m_positionX, m_positionY, m_positionZ, m_orientation);
|
||||
}
|
||||
|
||||
bool IsPositionValid() const;
|
||||
@@ -423,7 +423,7 @@ struct Position
|
||||
|
||||
float GetAngle(const Position *pos) const;
|
||||
float GetAngle(float x, float y) const;
|
||||
float GetRelativeAngle(const Position *pos) const
|
||||
float GetRelativeAngle(const Position *pos) const
|
||||
{ return GetAngle(pos) - m_orientation; }
|
||||
float GetRelativeAngle(float x, float y) const { return GetAngle(x, y) - m_orientation; }
|
||||
void GetSinCos(float x, float y, float &vsin, float &vcos) const;
|
||||
@@ -532,27 +532,27 @@ class WorldObject : public Object, public WorldLocation
|
||||
virtual const char* GetNameForLocaleIdx(int32 /*locale_idx*/) const { return GetName(); }
|
||||
|
||||
float GetDistance(const WorldObject *obj) const
|
||||
{
|
||||
{
|
||||
float d = GetExactDist(obj) - GetObjectSize() - obj->GetObjectSize();
|
||||
return d > 0.0f ? d : 0.0f;
|
||||
}
|
||||
float GetDistance(const Position &pos) const
|
||||
{
|
||||
{
|
||||
float d = GetExactDist(&pos) - GetObjectSize();
|
||||
return d > 0.0f ? d : 0.0f;
|
||||
}
|
||||
float GetDistance(float x, float y, float z) const
|
||||
{
|
||||
{
|
||||
float d = GetExactDist(x, y, z) - GetObjectSize();
|
||||
return d > 0.0f ? d : 0.0f;
|
||||
}
|
||||
float GetDistance2d(const WorldObject* obj) const
|
||||
{
|
||||
{
|
||||
float d = GetExactDist2d(obj) - GetObjectSize() - obj->GetObjectSize();
|
||||
return d > 0.0f ? d : 0.0f;
|
||||
}
|
||||
float GetDistance2d(float x, float y) const
|
||||
{
|
||||
{
|
||||
float d = GetExactDist2d(x, y) - GetObjectSize();
|
||||
return d > 0.0f ? d : 0.0f;
|
||||
}
|
||||
|
||||
+16
-16
@@ -3285,7 +3285,7 @@ void ObjectMgr::LoadGuilds()
|
||||
{
|
||||
Guild *newGuild;
|
||||
uint32 count = 0;
|
||||
|
||||
|
||||
// 0 1 2 3 4 5 6
|
||||
QueryResult_AutoPtr result = CharacterDatabase.Query("SELECT guild.guildid,guild.name,leaderguid,EmblemStyle,EmblemColor,BorderStyle,BorderColor,"
|
||||
// 7 8 9 10 11 12
|
||||
@@ -4083,8 +4083,8 @@ void ObjectMgr::LoadQuests()
|
||||
sLog.outErrorDb("Quest %u has `RewRepFaction%d` = %u but raw faction (faction.dbc) %u does not exist, quest will not reward reputation for this faction.", qinfo->GetQuestId(),j+1,qinfo->RewRepFaction[j] ,qinfo->RewRepFaction[j] );
|
||||
qinfo->RewRepFaction[j] = 0; // quest will not reward this
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
else if(qinfo->RewRepValue[j]!=0)
|
||||
{
|
||||
@@ -6745,28 +6745,28 @@ void ObjectMgr::LoadPointsOfInterest()
|
||||
void ObjectMgr::LoadQuestPOI()
|
||||
{
|
||||
uint32 count = 0;
|
||||
|
||||
|
||||
// 0 1 2 3
|
||||
QueryResult_AutoPtr result = WorldDatabase.Query("SELECT questId, id, objIndex, mapid, WorldMapAreaId, FloorId, unk3, unk4 FROM quest_poi order by questId");
|
||||
|
||||
|
||||
if(!result)
|
||||
{
|
||||
barGoLink bar(1);
|
||||
|
||||
|
||||
bar.step();
|
||||
|
||||
|
||||
sLog.outString();
|
||||
sLog.outErrorDb(">> Loaded 0 quest POI definitions. DB table `quest_poi` is empty.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
barGoLink bar(result->GetRowCount());
|
||||
|
||||
|
||||
do
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
bar.step();
|
||||
|
||||
|
||||
uint32 questId = fields[0].GetUInt32();
|
||||
uint32 id = fields[1].GetUInt32();
|
||||
int32 objIndex = fields[2].GetInt32();
|
||||
@@ -6777,9 +6777,9 @@ void ObjectMgr::LoadQuestPOI()
|
||||
uint32 unk4 = fields[7].GetUInt32();
|
||||
|
||||
QuestPOI POI(id, objIndex, mapId, WorldMapAreaId, FloorId, unk3, unk4);
|
||||
|
||||
|
||||
QueryResult_AutoPtr points = WorldDatabase.PQuery("SELECT x, y FROM quest_poi_points WHERE questId='%u' AND id='%i'", questId, id);
|
||||
|
||||
|
||||
if(points)
|
||||
{
|
||||
do
|
||||
@@ -6791,12 +6791,12 @@ void ObjectMgr::LoadQuestPOI()
|
||||
POI.points.push_back(point);
|
||||
} while (points->NextRow());
|
||||
}
|
||||
|
||||
|
||||
mQuestPOIMap[questId].push_back(POI);
|
||||
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString(">> Loaded %u quest POI definitions", count);
|
||||
}
|
||||
@@ -8209,7 +8209,7 @@ bool ObjectMgr::AddSpellToTrainer(int32 entry, int32 spell, Field *fields, std::
|
||||
if (trainerSpell.learnedSpell[0] == spell)
|
||||
trainerSpell.learnedSpell[0] = 0;
|
||||
// player must be able to cast spell on himself
|
||||
if (spellinfo->EffectImplicitTargetA[i] != 0 && spellinfo->EffectImplicitTargetA[i] != TARGET_UNIT_TARGET_ALLY
|
||||
if (spellinfo->EffectImplicitTargetA[i] != 0 && spellinfo->EffectImplicitTargetA[i] != TARGET_UNIT_TARGET_ALLY
|
||||
&& spellinfo->EffectImplicitTargetA[i] != TARGET_UNIT_TARGET_ANY && spellinfo->EffectImplicitTargetA[i] != TARGET_UNIT_CASTER)
|
||||
{
|
||||
sLog.outErrorDb("Table `npc_trainer` has spell %u for trainer entry %u with learn effect which has incorrect target type, ignoring learn effect!", spell, entry);
|
||||
|
||||
+2
-2
@@ -712,12 +712,12 @@ void Pet::GivePetXP(uint32 xp)
|
||||
// Subtract newXP from amount needed for nextlevel
|
||||
newXP -= nextLvlXP;
|
||||
GivePetLevel(level+1);
|
||||
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(level+1)*PET_XP_FACTOR);
|
||||
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(level+1)*PET_XP_FACTOR);
|
||||
|
||||
// Make sure we're working with the upgraded levels for the pet XP-levels
|
||||
level = getLevel();
|
||||
nextLvlXP = GetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP);
|
||||
|
||||
|
||||
// Hitting the pet/playerlevel combolimitation, set UNIT_FIELD_PETEXPERIENCE (current XP) to 0
|
||||
if ( level >= GetOwner()->getLevel() ) {
|
||||
newXP = 0;
|
||||
|
||||
@@ -58,7 +58,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
|
||||
sLog.outError("HandlePetAction.Pet %u isn't pet of player %s.", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName() );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!pet->isAlive())
|
||||
return;
|
||||
|
||||
|
||||
+17
-17
@@ -7956,7 +7956,7 @@ void Player::SendLoot(uint64 guid, LootType loot_type)
|
||||
bool groupRules = (group && go->GetGOInfo()->type == GAMEOBJECT_TYPE_CHEST && go->GetGOInfo()->chest.groupLootRules);
|
||||
|
||||
// check current RR player and get next if necessary
|
||||
if (groupRules)
|
||||
if (groupRules)
|
||||
group->UpdateLooterGuid(go, true);
|
||||
|
||||
loot->FillLoot(lootid, LootTemplates_Gameobject, this, !groupRules, false, go->GetLootMode());
|
||||
@@ -8012,7 +8012,7 @@ void Player::SendLoot(uint64 guid, LootType loot_type)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
permission = ALL_PERMISSION;
|
||||
}
|
||||
}
|
||||
@@ -11597,7 +11597,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
|
||||
|
||||
RemoveEnchantmentDurations(pItem);
|
||||
RemoveItemDurations(pItem);
|
||||
|
||||
|
||||
pItem->SetNotRefundable(this);
|
||||
|
||||
ItemRemovedQuestCheck( pItem->GetEntry(), pItem->GetCount() );
|
||||
@@ -14088,7 +14088,7 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver
|
||||
|
||||
if (pQuest->GetRewArenaPoints())
|
||||
ModifyArenaPoints(pQuest->GetRewArenaPoints());
|
||||
|
||||
|
||||
// Send reward mail
|
||||
if (uint32 mail_template_id = pQuest->GetRewMailTemplateId())
|
||||
MailDraft(mail_template_id).SendMailTo(this, questGiver, MAIL_CHECK_MASK_NONE, pQuest->GetRewMailDelaySecs());
|
||||
@@ -15540,11 +15540,11 @@ float Player::GetFloatValueFromDB(uint16 index, uint64 guid)
|
||||
|
||||
bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
||||
{
|
||||
//// 0 1 2 3 4 5 6 7 8 9 10 11 12
|
||||
//// 0 1 2 3 4 5 6 7 8 9 10 11 12
|
||||
//QueryResult *result = CharacterDatabase.PQuery("SELECT guid, account, data, name, race, class, gender, level, xp, money, playerBytes, playerBytes2, playerFlags,"
|
||||
// 13 14 15 16 17 18 19 20 21 22 23 24 25
|
||||
// 13 14 15 16 17 18 19 20 21 22 23 24 25
|
||||
//"position_x, position_y, position_z, map, orientation, taximask, cinematic, totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost,"
|
||||
// 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
||||
// 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
||||
//"resettalents_time, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, dungeon_difficulty,"
|
||||
// 40 41 42 43 44 45 46 47 48 49 50
|
||||
//"arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk,"
|
||||
@@ -15600,7 +15600,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
||||
|
||||
SetUInt32Value(UNIT_FIELD_LEVEL, fields[7].GetUInt8());
|
||||
SetUInt32Value(PLAYER_XP, fields[8].GetUInt32());
|
||||
|
||||
|
||||
uint32 money = fields[9].GetUInt32();
|
||||
if (money > MAX_MONEY_AMOUNT)
|
||||
money = MAX_MONEY_AMOUNT;
|
||||
@@ -16189,7 +16189,7 @@ bool Player::isAllowedToLoot(const Creature* creature)
|
||||
// or if there are free/quest/conditional item for the player
|
||||
if (loot->roundRobinPlayer == 0 || loot->roundRobinPlayer == GetGUID())
|
||||
return true;
|
||||
|
||||
|
||||
return loot->hasItemFor(this);
|
||||
case GROUP_LOOT:
|
||||
case NEED_BEFORE_GREED:
|
||||
@@ -16429,13 +16429,13 @@ void Player::_LoadInventory(QueryResult_AutoPtr result, uint32 timediff)
|
||||
item->GetGUIDLow(), GetGUIDLow());
|
||||
if (!result2)
|
||||
{
|
||||
sLog.outDebug("Item::LoadFromDB, "
|
||||
sLog.outDebug("Item::LoadFromDB, "
|
||||
"Item GUID: %u has field flags & ITEM_FLAGS_REFUNDABLE but has no data in item_refund_instance, removing flag.",
|
||||
item->GetGUIDLow());
|
||||
RemoveFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_REFUNDABLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
fields = result2->Fetch();
|
||||
item->SetRefundRecipient(fields[0].GetUInt32());
|
||||
item->SetPaidMoney(fields[1].GetUInt32());
|
||||
@@ -16444,7 +16444,7 @@ void Player::_LoadInventory(QueryResult_AutoPtr result, uint32 timediff)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool success = true;
|
||||
|
||||
if (!bag_guid)
|
||||
@@ -17363,7 +17363,7 @@ void Player::SaveToDB()
|
||||
ss << (uint64)m_deathExpireTime << ", '";
|
||||
|
||||
ss << m_taxi.SaveTaxiDestinationsToString() << "', ";
|
||||
|
||||
|
||||
ss << GetArenaPoints() << ", ";
|
||||
|
||||
ss << GetHonorPoints() << ", ";
|
||||
@@ -17539,11 +17539,11 @@ void Player::_SaveInventory()
|
||||
{
|
||||
iPtr->UpdatePlayedTime(this);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog.outError("Can't find item guid " UI64FMTD " but is in refundable storage for player %u ! Removing.", (*itr), GetGUIDLow());
|
||||
m_refundableItems.erase(itr);
|
||||
m_refundableItems.erase(itr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19368,7 +19368,7 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
|
||||
}
|
||||
|
||||
ModifyMoney( -(int32)price );
|
||||
|
||||
|
||||
if (crItem->ExtendedCost) // case for new honor system
|
||||
{
|
||||
ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(crItem->ExtendedCost);
|
||||
@@ -19396,7 +19396,7 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
|
||||
data << uint32(count);
|
||||
GetSession()->SendPacket(&data);
|
||||
SendNewItem(it, pProto->BuyCount*count, true, false, false);
|
||||
|
||||
|
||||
if (it->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_REFUNDABLE) && crItem->ExtendedCost)
|
||||
{
|
||||
it->SetRefundRecipient(GetGUIDLow());
|
||||
|
||||
+1
-1
@@ -1189,7 +1189,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
|
||||
uint8 _CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count = NULL) const;
|
||||
uint8 _CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec& dest, uint32 entry, uint32 count, Item *pItem = NULL, bool swap = false, uint32* no_space_count = NULL ) const;
|
||||
|
||||
|
||||
void AddRefundReference(uint64 it);
|
||||
void DeleteRefundReference(uint64 it);
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@ void PoolGroup<T>::SpawnObject(SpawnedPoolData& spawns, uint32 limit, uint32 tri
|
||||
int count = limit - spawns.GetSpawnedObjects(poolId);
|
||||
|
||||
// If triggered from some object respawn this object is still marked as spawned
|
||||
// and also counted into m_SpawnedPoolAmount so we need increase count to be
|
||||
// and also counted into m_SpawnedPoolAmount so we need increase count to be
|
||||
// spawned by 1
|
||||
if (triggerFrom)
|
||||
++count;
|
||||
|
||||
+10
-10
@@ -476,29 +476,29 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data)
|
||||
{
|
||||
uint32 count;
|
||||
recv_data >> count; // quest count, max=25
|
||||
|
||||
|
||||
if(count >= MAX_QUEST_LOG_SIZE)
|
||||
return;
|
||||
|
||||
|
||||
WorldPacket data(SMSG_QUEST_POI_QUERY_RESPONSE, 4+(4+4)*count);
|
||||
data << uint32(count); // count
|
||||
|
||||
|
||||
for(int i = 0; i < count; ++i)
|
||||
{
|
||||
uint32 questId;
|
||||
recv_data >> questId; // quest id
|
||||
|
||||
|
||||
bool questOk = false;
|
||||
|
||||
|
||||
uint16 questSlot = _player->FindQuestSlot(questId);
|
||||
|
||||
|
||||
if(questSlot != MAX_QUEST_LOG_SIZE)
|
||||
questOk =_player->GetQuestSlotQuestId(questSlot) == questId;
|
||||
|
||||
|
||||
if(questOk)
|
||||
{
|
||||
QuestPOIVector const *POI = objmgr.GetQuestPOIVector(questId);
|
||||
|
||||
|
||||
if(POI)
|
||||
{
|
||||
data << uint32(questId); // quest ID
|
||||
@@ -514,7 +514,7 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data)
|
||||
data << uint32(itr->Unk3); // unknown
|
||||
data << uint32(itr->Unk4); // unknown
|
||||
data << uint32(itr->points.size()); // POI points count
|
||||
|
||||
|
||||
for(std::vector<QuestPOIPoint>::const_iterator itr2 = itr->points.begin(); itr2 != itr->points.end(); ++itr2)
|
||||
{
|
||||
data << int32(itr2->x); // POI point x
|
||||
@@ -534,6 +534,6 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data)
|
||||
data << uint32(0); // POI count
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SendPacket(&data);
|
||||
}
|
||||
+23
-23
@@ -65,52 +65,52 @@ Quest::Quest(Field * questRecord)
|
||||
RequestItemsText = questRecord[38].GetCppString();
|
||||
EndText = questRecord[39].GetCppString();
|
||||
CompletedText = questRecord[40].GetCppString();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
ObjectiveText[i] = questRecord[41+i].GetCppString();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||
ReqItemId[i] = questRecord[45+i].GetUInt32();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i)
|
||||
ReqItemCount[i] = questRecord[51+i].GetUInt32();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
|
||||
ReqSourceId[i] = questRecord[57+i].GetUInt32();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
|
||||
ReqSourceCount[i] = questRecord[61+i].GetUInt32();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
ReqCreatureOrGOId[i] = questRecord[65+i].GetInt32();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
ReqCreatureOrGOCount[i] = questRecord[69+i].GetUInt32();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||
ReqSpell[i] = questRecord[73+i].GetUInt32();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
|
||||
RewChoiceItemId[i] = questRecord[77+i].GetUInt32();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
|
||||
RewChoiceItemCount[i] = questRecord[83+i].GetUInt32();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
|
||||
RewItemId[i] = questRecord[89+i].GetUInt32();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
|
||||
RewItemCount[i] = questRecord[93+i].GetUInt32();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
|
||||
RewRepFaction[i] = questRecord[97+i].GetUInt32();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
|
||||
RewRepValueId[i] = questRecord[102+i].GetInt32();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
|
||||
RewRepValue[i] = questRecord[107+i].GetInt32();
|
||||
|
||||
|
||||
RewHonorableKills = questRecord[112].GetUInt32();
|
||||
RewHonorMultiplier = questRecord[113].GetFloat();
|
||||
RewOrReqMoney = questRecord[114].GetInt32();
|
||||
@@ -123,22 +123,22 @@ Quest::Quest(Field * questRecord)
|
||||
PointX = questRecord[121].GetFloat();
|
||||
PointY = questRecord[122].GetFloat();
|
||||
PointOpt = questRecord[123].GetUInt32();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
|
||||
DetailsEmote[i] = questRecord[124+i].GetUInt32();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
|
||||
DetailsEmoteDelay[i] = questRecord[128+i].GetUInt32();
|
||||
|
||||
|
||||
IncompleteEmote = questRecord[132].GetUInt32();
|
||||
CompleteEmote = questRecord[133].GetUInt32();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
|
||||
OfferRewardEmote[i] = questRecord[134+i].GetInt32();
|
||||
|
||||
|
||||
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
|
||||
OfferRewardEmoteDelay[i] = questRecord[138+i].GetInt32();
|
||||
|
||||
|
||||
QuestStartScript = questRecord[142].GetUInt32();
|
||||
QuestCompleteScript = questRecord[143].GetUInt32();
|
||||
|
||||
@@ -184,7 +184,7 @@ uint32 Quest::XPValue( Player *pPlayer ) const
|
||||
xpentry = sQuestXPStore.LookupEntry(quest_level);
|
||||
if(!xpentry)
|
||||
return 0;
|
||||
|
||||
|
||||
int diffFactor = 2 * (quest_level - pPlayer->getLevel()) + 20;
|
||||
|
||||
if (diffFactor < 1)
|
||||
|
||||
@@ -35,11 +35,11 @@ struct TSpellSummary {
|
||||
|
||||
ScriptMgr::ScriptMgr()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
ScriptMgr::~ScriptMgr()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
void ScriptMgr::ScriptsInit()
|
||||
|
||||
@@ -37,7 +37,7 @@ struct Script
|
||||
pOnGetMoney(NULL), pOnPlayerChat(NULL), pOnServerStartup(NULL), pOnServerShutdown(NULL),
|
||||
pOnAreaChange(NULL), pOnItemClick(NULL), pOnItemOpen(NULL), pOnGoClick(NULL), pOnCreatureKill(NULL),
|
||||
pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL),
|
||||
pGOSelect(NULL), pGOSelectWithCode(NULL),
|
||||
pGOSelect(NULL), pGOSelectWithCode(NULL),
|
||||
pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pGODialogStatus(NULL),
|
||||
pChooseReward(NULL), pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pItemQuestAccept(NULL),
|
||||
pGOQuestAccept(NULL), pGOChooseReward(NULL),pItemUse(NULL), pItemExpire(NULL),
|
||||
@@ -96,10 +96,10 @@ class ScriptMgr
|
||||
public:
|
||||
ScriptMgr();
|
||||
~ScriptMgr();
|
||||
|
||||
|
||||
void ScriptsInit();
|
||||
void LoadDatabase();
|
||||
char const* ScriptsVersion();
|
||||
char const* ScriptsVersion();
|
||||
|
||||
//event handlers
|
||||
void OnLogin(Player *pPlayer);
|
||||
|
||||
@@ -170,8 +170,8 @@ struct ScriptedAI : public CreatureAI
|
||||
bool EnterEvadeIfOutOfCombatArea(const uint32 uiDiff);
|
||||
|
||||
// return true for heroic mode. i.e.
|
||||
// - for dungeon in mode 10-heroic,
|
||||
// - for raid in mode 10-Heroic
|
||||
// - for dungeon in mode 10-heroic,
|
||||
// - for raid in mode 10-Heroic
|
||||
// - for raid in mode 25-heroic
|
||||
// DO NOT USE to check raid in mode 25-normal.
|
||||
bool IsHeroic() { return m_heroicMode; }
|
||||
@@ -228,7 +228,7 @@ struct ScriptedAI : public CreatureAI
|
||||
private:
|
||||
bool m_bCombatMovement;
|
||||
uint32 m_uiEvadeCheckCooldown;
|
||||
|
||||
|
||||
bool m_heroicMode;
|
||||
Difficulty m_difficulty;
|
||||
};
|
||||
|
||||
+14
-14
@@ -815,11 +815,11 @@ void Spell::prepareDataForTriggerSystem(AuraEffect const * triggeredByAura)
|
||||
m_procEx= PROC_EX_NONE;
|
||||
|
||||
// Hunter trap spells - activation proc for Lock and Load, Entrapment and Misdirection
|
||||
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER &&
|
||||
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER &&
|
||||
(m_spellInfo->SpellFamilyFlags[0] & 0x18 || // Freezing and Frost Trap, Freezing Arrow
|
||||
m_spellInfo->Id == 57879 || // Snake Trap - done this way to avoid double proc
|
||||
m_spellInfo->SpellFamilyFlags[2] & 0x00024000)) // Explosive and Immolation Trap
|
||||
|
||||
|
||||
m_procAttacker |= PROC_FLAG_ON_TRAP_ACTIVATION;
|
||||
|
||||
/*
|
||||
@@ -1210,7 +1210,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
caster->ProcDamageAndSpell(unit, procAttacker, procVictim, procEx, 0, m_attackType, m_spellInfo, m_triggeredByAuraSpell);
|
||||
|
||||
// Failed Pickpocket, reveal rogue
|
||||
if (missInfo == SPELL_MISS_RESIST
|
||||
if (missInfo == SPELL_MISS_RESIST
|
||||
&& m_customAttr & SPELL_ATTR_CU_PICKPOCKET
|
||||
&& unitTarget->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
@@ -1371,7 +1371,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
|
||||
|
||||
if(m_originalCaster)
|
||||
{
|
||||
if (m_spellAura = Aura::TryCreate(aurSpellInfo, effectMask, unit,
|
||||
if (m_spellAura = Aura::TryCreate(aurSpellInfo, effectMask, unit,
|
||||
m_originalCaster,(aurSpellInfo == m_spellInfo)? &m_currentBasePoints[0] : &basePoints[0], m_CastItem))
|
||||
{
|
||||
// Now Reduce spell duration using data received at spell hit
|
||||
@@ -2981,7 +2981,7 @@ void Spell::cast(bool skipCheck)
|
||||
}
|
||||
|
||||
// we must send smsg_spell_go packet before m_castItem delete in TakeCastItem()...
|
||||
SendSpellGo();
|
||||
SendSpellGo();
|
||||
|
||||
// Okay, everything is prepared. Now we need to distinguish between immediate and evented delayed spells
|
||||
if (m_spellInfo->speed > 0.0f && !IsChanneledSpell(m_spellInfo) || m_spellInfo->Id == 14157)
|
||||
@@ -3609,9 +3609,9 @@ void Spell::SendSpellGo()
|
||||
&& m_spellInfo->powerType != POWER_HEALTH )
|
||||
castFlags |= CAST_FLAG_POWER_LEFT_SELF; // should only be sent to self, but the current messaging doesn't make that possible
|
||||
|
||||
if((m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
&& (m_caster->getClass() == CLASS_DEATH_KNIGHT)
|
||||
&& m_spellInfo->runeCostID
|
||||
if((m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
&& (m_caster->getClass() == CLASS_DEATH_KNIGHT)
|
||||
&& m_spellInfo->runeCostID
|
||||
&& m_spellInfo->powerType == POWER_RUNE)
|
||||
{
|
||||
castFlags |= CAST_FLAG_UNKNOWN_19; // same as in SMSG_SPELL_START
|
||||
@@ -3640,7 +3640,7 @@ void Spell::SendSpellGo()
|
||||
|
||||
if ((m_spellInfo->Targets & TARGET_FLAG_SOURCE_LOCATION) && m_targets.HasSrc())
|
||||
m_targets.setTargetMask(m_targets.getTargetMask() | TARGET_FLAG_SOURCE_LOCATION);
|
||||
else
|
||||
else
|
||||
m_targets.setTargetMask(m_targets.getTargetMask() & ~TARGET_FLAG_SOURCE_LOCATION);
|
||||
|
||||
if ((m_spellInfo->Targets & TARGET_FLAG_DEST_LOCATION) && m_targets.HasDst())
|
||||
@@ -4588,7 +4588,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
// Lay on Hands - cannot be self-cast on paladin with Forbearance or after using Avenging Wrath
|
||||
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN && m_spellInfo->SpellFamilyFlags[0] & 0x0008000)
|
||||
if (target->HasAura(61988)) // Immunity shield marker
|
||||
return SPELL_FAILED_TARGET_AURASTATE;
|
||||
return SPELL_FAILED_TARGET_AURASTATE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4644,7 +4644,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
}
|
||||
*/
|
||||
|
||||
if(target)
|
||||
if(target)
|
||||
if(IsPositiveSpell(m_spellInfo->Id))
|
||||
if(target->IsImmunedToSpell(m_spellInfo))
|
||||
return SPELL_FAILED_TARGET_AURASTATE;
|
||||
@@ -5216,11 +5216,11 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
{
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return SPELL_FAILED_DONT_REPORT;
|
||||
|
||||
|
||||
Unit* target = m_targets.getUnitTarget();
|
||||
if (!target || target->GetTypeId() != TYPEID_PLAYER)
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
|
||||
|
||||
if (!m_caster->ToPlayer()->IsInSameRaidWith(target->ToPlayer()))
|
||||
return SPELL_FAILED_TARGET_NOT_IN_RAID;
|
||||
|
||||
@@ -6106,7 +6106,7 @@ SpellCastResult Spell::CheckItems()
|
||||
if (pProto->Spells[x].SpellCharges != 0 && pitem->GetSpellCharges(x) == pProto->Spells[x].SpellCharges)
|
||||
return SPELL_FAILED_ITEM_AT_MAX_CHARGES;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
|
||||
+3
-3
@@ -61,7 +61,7 @@ enum SpellCastTargetFlags
|
||||
TARGET_FLAG_CORPSE = 0x00008000, // pguid, resurrection spells
|
||||
TARGET_FLAG_UNK2 = 0x00010000, // pguid, not used in any spells as of 3.2.2a (can be set dynamically)
|
||||
TARGET_FLAG_GLYPH = 0x00020000, // used in glyph spells
|
||||
TARGET_FLAG_UNK3 = 0x00040000, //
|
||||
TARGET_FLAG_UNK3 = 0x00040000, //
|
||||
TARGET_FLAG_UNK4 = 0x00080000 // uint32, loop { vec3, guid -> if guid == 0 break }
|
||||
};
|
||||
|
||||
@@ -161,7 +161,7 @@ class SpellCastTargets
|
||||
uint32 getTargetMask() const { return m_targetMask; }
|
||||
void setTargetMask(uint32 newMask) { m_targetMask = newMask; }
|
||||
uint32 getIntTargetFlags() const { return m_intTargetFlags; }
|
||||
|
||||
|
||||
uint64 getUnitTargetGUID() const { return m_unitTargetGUID; }
|
||||
Unit *getUnitTarget() const { return m_unitTarget; }
|
||||
void setUnitTarget(Unit *target);
|
||||
@@ -460,7 +460,7 @@ class Spell
|
||||
|
||||
void HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTarget,uint32 i);
|
||||
void HandleThreatSpells(uint32 spellId);
|
||||
|
||||
|
||||
const SpellEntry * const m_spellInfo;
|
||||
int32 m_currentBasePoints[3]; // cache SpellEntry::EffectBasePoints and use for set custom base points
|
||||
Item* m_CastItem;
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
class Aura;
|
||||
//
|
||||
// EFFECT HANDLER NOTES
|
||||
//
|
||||
//
|
||||
// in aura handler there should be check for modes:
|
||||
// AURA_EFFECT_HANDLE_REAL set - aura mod is just applied/removed on the target
|
||||
// AURA_EFFECT_HANDLE_SEND_FOR_CLIENT_MASK set - aura is just applied/removed, or aura packet request is made
|
||||
@@ -504,8 +504,8 @@ int32 AuraEffect::CalculateAmount(Unit * caster)
|
||||
// Borrowed Time
|
||||
if (AuraEffect const * aurEff = caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_PRIEST, 2899, 1))
|
||||
bonus += aurEff->GetAmount() / 100;
|
||||
|
||||
DoneActualBenefit = caster->SpellBaseHealingBonus(GetSpellSchoolMask(GetSpellProto())) * bonus;
|
||||
|
||||
DoneActualBenefit = caster->SpellBaseHealingBonus(GetSpellSchoolMask(GetSpellProto())) * bonus;
|
||||
}
|
||||
break;
|
||||
case SPELLFAMILY_PALADIN:
|
||||
@@ -1119,7 +1119,7 @@ void AuraEffect::UpdatePeriodic(Unit * caster)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SPELLFAMILY_MAGE:
|
||||
case SPELLFAMILY_MAGE:
|
||||
if (GetId() == 55342)// Mirror Image
|
||||
m_isPeriodic = false;
|
||||
break;
|
||||
@@ -1859,7 +1859,7 @@ void AuraEffect::PeriodicDummyTick(Unit * target, Unit * caster) const
|
||||
target->RemoveAurasDueToSpell(31665);
|
||||
break;
|
||||
// Killing Spree
|
||||
case 51690:
|
||||
case 51690:
|
||||
{
|
||||
// TODO: this should use effect[1] of 51690
|
||||
UnitList targets;
|
||||
@@ -4119,7 +4119,7 @@ void AuraEffect::HandleModMechanicImmunity(AuraApplication const * aurApp, uint8
|
||||
target->ApplySpellImmune(GetId(), IMMUNITY_MECHANIC, GetMiscValue(), apply);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (apply && GetSpellProto()->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)
|
||||
target->RemoveAurasWithMechanic(mechanic, AURA_REMOVE_BY_DEFAULT, GetId());
|
||||
}
|
||||
@@ -5508,7 +5508,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
||||
{
|
||||
float currentGroundLevel = target->GetBaseMap()->GetHeight(target->GetPositionX(), target->GetPositionY(), MAX_HEIGHT);
|
||||
if (target->GetPositionZ() > currentGroundLevel)
|
||||
target->GetMotionMaster()->MoveFall(currentGroundLevel);
|
||||
target->GetMotionMaster()->MoveFall(currentGroundLevel);
|
||||
}
|
||||
break;
|
||||
case 46699: // Requires No Ammo
|
||||
@@ -5864,7 +5864,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
||||
{
|
||||
if (target->m_form != FORM_CAT)
|
||||
break;
|
||||
|
||||
|
||||
target->CastSpell(target, spellId, true, NULL, NULL, GetCasterGUID());
|
||||
break;
|
||||
}
|
||||
@@ -6006,7 +6006,7 @@ void AuraEffect::HandleChannelDeathItem(AuraApplication const * aurApp, uint8 mo
|
||||
//Adding items
|
||||
uint32 noSpaceForCount = 0;
|
||||
uint32 count = m_amount;
|
||||
|
||||
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = plCaster->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, GetSpellProto()->EffectItemType[m_effIndex], count, &noSpaceForCount);
|
||||
if( msg != EQUIP_ERR_OK )
|
||||
@@ -6152,7 +6152,7 @@ void AuraEffect::HandleAuraConvertRune(AuraApplication const * aurApp, uint8 mod
|
||||
continue;
|
||||
if(!plr->GetRuneCooldown(i))
|
||||
{
|
||||
// ConvertRune(i,
|
||||
// ConvertRune(i,
|
||||
plr->AddRuneByAuraEffect(i, RuneType(GetMiscValueB()), this);
|
||||
--runes;
|
||||
}
|
||||
|
||||
+11
-11
@@ -35,7 +35,7 @@
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "CellImpl.h"
|
||||
|
||||
AuraApplication::AuraApplication(Unit * target, Unit * caster, Aura * aura, uint8 effMask)
|
||||
AuraApplication::AuraApplication(Unit * target, Unit * caster, Aura * aura, uint8 effMask)
|
||||
: m_target(target), m_base(aura), m_slot(MAX_AURAS), m_flags(AFLAG_NONE), m_needClientUpdate(false)
|
||||
, m_removeMode(AURA_REMOVE_NONE), m_effectsToApply(effMask)
|
||||
{
|
||||
@@ -445,7 +445,7 @@ void Aura::UpdateTargetMap(Unit * caster, bool apply)
|
||||
targetsToRemove.push_back(appIter->second->GetTarget());
|
||||
else
|
||||
{
|
||||
// needs readding - remove now, will be applied in next update cycle
|
||||
// needs readding - remove now, will be applied in next update cycle
|
||||
// (dbcs do not have auras which apply on same type of targets but have different radius, so this is not really needed)
|
||||
if (appIter->second->GetEffectMask() != existing->second)
|
||||
targetsToRemove.push_back(appIter->second->GetTarget());
|
||||
@@ -527,7 +527,7 @@ void Aura::UpdateTargetMap(Unit * caster, bool apply)
|
||||
// targets have to be registered and not have effect applied yet to use this function
|
||||
void Aura::_ApplyEffectForTargets(uint8 effIndex)
|
||||
{
|
||||
Unit * caster = GetCaster();
|
||||
Unit * caster = GetCaster();
|
||||
// prepare list of aura targets
|
||||
UnitList targetList;
|
||||
for (ApplicationMap::iterator appIter = m_applications.begin(); appIter != m_applications.end(); ++appIter)
|
||||
@@ -617,7 +617,7 @@ void Aura::Update(uint32 diff, Unit * caster)
|
||||
else
|
||||
{
|
||||
Remove();
|
||||
return;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -715,9 +715,9 @@ bool Aura::IsPassive() const
|
||||
return IsPassiveSpell(GetSpellProto());
|
||||
}
|
||||
|
||||
bool Aura::IsDeathPersistent() const
|
||||
bool Aura::IsDeathPersistent() const
|
||||
{
|
||||
return IsDeathPersistentSpell(GetSpellProto());
|
||||
return IsDeathPersistentSpell(GetSpellProto());
|
||||
}
|
||||
|
||||
bool Aura::CanBeSaved() const
|
||||
@@ -768,7 +768,7 @@ bool Aura::IsVisible() const
|
||||
// Is this blizzlike? show totem passive auras
|
||||
if (GetOwner()->GetTypeId() == TYPEID_UNIT && m_owner->ToCreature()->isTotem() && IsPassive())
|
||||
return true;
|
||||
return !IsPassive() || HasEffectType(SPELL_AURA_ABILITY_IGNORE_AURASTATE);
|
||||
return !IsPassive() || HasEffectType(SPELL_AURA_ABILITY_IGNORE_AURASTATE);
|
||||
}
|
||||
|
||||
void Aura::UnregisterSingleTarget()
|
||||
@@ -899,7 +899,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
|
||||
{
|
||||
case 31571: spellId = 57529; break;
|
||||
case 31572: spellId = 57531; break;
|
||||
default:
|
||||
default:
|
||||
sLog.outError("Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId());
|
||||
}
|
||||
if(spellId)
|
||||
@@ -1251,7 +1251,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
|
||||
target->CastSpell(target, GetEffect(0)->GetAmount(), true, NULL, GetEffect(0));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1457,7 +1457,7 @@ void Aura::_DeleteRemovedApplications()
|
||||
}
|
||||
|
||||
UnitAura::UnitAura(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit * caster, int32 *baseAmount, Item * castItem, uint64 casterGUID)
|
||||
: Aura(spellproto, effMask, owner, caster, baseAmount, castItem, casterGUID)
|
||||
: Aura(spellproto, effMask, owner, caster, baseAmount, castItem, casterGUID)
|
||||
{
|
||||
m_AuraDRGroup = DIMINISHING_NONE;
|
||||
GetUnitOwner()->_AddAura(this, caster);
|
||||
@@ -1567,7 +1567,7 @@ void UnitAura::FillTargetMap(std::map<Unit *, uint8> & targets, Unit * caster)
|
||||
}
|
||||
|
||||
DynObjAura::DynObjAura(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit * caster, int32 *baseAmount, Item * castItem, uint64 casterGUID)
|
||||
: Aura(spellproto, effMask, owner, caster, baseAmount, castItem, casterGUID)
|
||||
: Aura(spellproto, effMask, owner, caster, baseAmount, castItem, casterGUID)
|
||||
{
|
||||
GetDynobjOwner()->SetAura(this);
|
||||
}
|
||||
|
||||
@@ -1514,7 +1514,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
// Glyph of Eternal Water
|
||||
if (unitTarget->HasAura(70937))
|
||||
unitTarget->CastSpell(unitTarget, 70908, true);
|
||||
else
|
||||
else
|
||||
unitTarget->CastSpell(unitTarget, 70907, true);
|
||||
}
|
||||
}
|
||||
@@ -2198,7 +2198,7 @@ void Spell::EffectTriggerSpellWithValue(uint32 i)
|
||||
|
||||
int32 bp = damage;
|
||||
Unit * caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
|
||||
|
||||
|
||||
caster->CastCustomSpell(unitTarget,triggered_spell_id,&bp,&bp,&bp,true);
|
||||
}
|
||||
|
||||
@@ -2240,7 +2240,7 @@ void Spell::EffectForceCast(uint32 i)
|
||||
{
|
||||
case 52588: // Skeletal Gryphon Escape
|
||||
case 48598: // Ride Flamebringer Cue
|
||||
unitTarget->RemoveAura(damage);
|
||||
unitTarget->RemoveAura(damage);
|
||||
break;
|
||||
case 52463: // Hide In Mine Car
|
||||
case 52349: // Overtake
|
||||
@@ -5720,10 +5720,10 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
{
|
||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
|
||||
if (roll_chance_i(50)) // chance unknown, using 50
|
||||
return;
|
||||
|
||||
|
||||
static uint32 const spellPlayer[5] =
|
||||
{
|
||||
45674, // Bigger!
|
||||
@@ -5732,7 +5732,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
45682, // Ghost
|
||||
45684 // Polymorph
|
||||
};
|
||||
|
||||
|
||||
static uint32 const spellTarget[5] = {
|
||||
45673, // Bigger!
|
||||
45672, // Shrunk
|
||||
@@ -5740,7 +5740,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
45681, // Ghost
|
||||
45683 // Polymorph
|
||||
};
|
||||
|
||||
|
||||
m_caster->CastSpell(m_caster, spellPlayer[urand(0,4)], true);
|
||||
unitTarget->CastSpell(unitTarget, spellTarget[urand(0,4)], true);
|
||||
break;
|
||||
|
||||
+11
-11
@@ -877,7 +877,7 @@ class SpellMgr
|
||||
|
||||
bool IsAffectedByMod(SpellEntry const *spellInfo, SpellModifier *mod) const;
|
||||
|
||||
SpellSpellGroupMapBounds GetSpellSpellGroupMapBounds(uint32 spell_id) const
|
||||
SpellSpellGroupMapBounds GetSpellSpellGroupMapBounds(uint32 spell_id) const
|
||||
{
|
||||
spell_id = GetFirstSpellInChain(spell_id);
|
||||
return SpellSpellGroupMapBounds(mSpellSpellGroup.lower_bound(spell_id),mSpellSpellGroup.upper_bound(spell_id));
|
||||
@@ -893,16 +893,16 @@ class SpellMgr
|
||||
return false;
|
||||
}
|
||||
|
||||
SpellGroupSpellMapBounds GetSpellGroupSpellMapBounds(SpellGroup group_id) const
|
||||
SpellGroupSpellMapBounds GetSpellGroupSpellMapBounds(SpellGroup group_id) const
|
||||
{
|
||||
return SpellGroupSpellMapBounds(mSpellGroupSpell.lower_bound(group_id),mSpellGroupSpell.upper_bound(group_id));
|
||||
}
|
||||
void GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>& foundSpells) const
|
||||
void GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>& foundSpells) const
|
||||
{
|
||||
std::set<SpellGroup> usedGroups;
|
||||
GetSetOfSpellsInSpellGroup(group_id, foundSpells, usedGroups);
|
||||
}
|
||||
void GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>& foundSpells, std::set<SpellGroup>& usedGroups) const
|
||||
void GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>& foundSpells, std::set<SpellGroup>& usedGroups) const
|
||||
{
|
||||
if (usedGroups.find(group_id) != usedGroups.end())
|
||||
return;
|
||||
@@ -1066,16 +1066,16 @@ class SpellMgr
|
||||
return 0;
|
||||
}
|
||||
|
||||
SpellRequiredMapBounds GetSpellsRequiredForSpellBounds(uint32 spell_id) const
|
||||
{
|
||||
SpellRequiredMapBounds GetSpellsRequiredForSpellBounds(uint32 spell_id) const
|
||||
{
|
||||
return SpellRequiredMapBounds(mSpellReq.lower_bound(spell_id),mSpellReq.upper_bound(spell_id));
|
||||
}
|
||||
|
||||
SpellsRequiringSpellMapBounds GetSpellsRequiringSpellBounds(uint32 spell_id) const
|
||||
{
|
||||
SpellsRequiringSpellMapBounds GetSpellsRequiringSpellBounds(uint32 spell_id) const
|
||||
{
|
||||
return SpellsRequiringSpellMapBounds(mSpellsReqSpell.lower_bound(spell_id),mSpellsReqSpell.upper_bound(spell_id));
|
||||
}
|
||||
bool IsSpellRequiringSpell(uint32 spellid, uint32 req_spellid) const
|
||||
bool IsSpellRequiringSpell(uint32 spellid, uint32 req_spellid) const
|
||||
{
|
||||
SpellsRequiringSpellMapBounds spellsRequiringSpell = GetSpellsRequiringSpellBounds(req_spellid);
|
||||
for (SpellsRequiringSpellMap::const_iterator itr = spellsRequiringSpell.first; itr != spellsRequiringSpell.second; ++itr)
|
||||
@@ -1280,10 +1280,10 @@ class SpellMgr
|
||||
uint32 GetSpellRequired(uint32 spell_id) const
|
||||
{
|
||||
SpellRequiredMap::const_iterator itr = mSpellReq.find(spell_id);
|
||||
|
||||
|
||||
if(itr == mSpellReq.end())
|
||||
return NULL;
|
||||
|
||||
|
||||
return itr->second;
|
||||
}
|
||||
|
||||
|
||||
@@ -927,7 +927,7 @@ bool Guardian::UpdateStats(Stats stat)
|
||||
// Handle Death Knight Glyphs and Talents
|
||||
float mod = 0.75f;
|
||||
if (IsPetGhoul() && (stat == STAT_STAMINA || stat == STAT_STRENGTH))
|
||||
{
|
||||
{
|
||||
switch (stat)
|
||||
{
|
||||
case STAT_STAMINA: mod = 0.3f; break; // Default Owner's Stamina scale
|
||||
|
||||
+7
-7
@@ -6754,7 +6754,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
for (ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr) {
|
||||
if ((*itr)->GetEntry() != 2630)
|
||||
continue;
|
||||
|
||||
|
||||
caster = (*itr);
|
||||
break;
|
||||
}
|
||||
@@ -8554,7 +8554,7 @@ FactionTemplateEntry const* Unit::getFactionTemplateEntry() const
|
||||
sLog.outError("Player %s has invalid faction (faction template id) #%u", player->GetName(), getFaction());
|
||||
else if (const Creature *creature = ToCreature())
|
||||
sLog.outError("Creature (template id: %u) has invalid faction (faction template id) #%u", creature->GetCreatureInfo()->Entry, getFaction());
|
||||
else
|
||||
else
|
||||
sLog.outError("Unit (name=%s, type=%u) has invalid faction (faction template id) #%u", GetName(), uint32(GetTypeId()), getFaction());
|
||||
|
||||
guid = GetGUID();
|
||||
@@ -10982,7 +10982,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage, WeaponAttackType att
|
||||
{
|
||||
// Merciless Combat
|
||||
if ((*i)->GetSpellProto()->SpellIconID == 2656)
|
||||
{
|
||||
{
|
||||
if ((pVictim->GetMaxHealth() * 35 / 100) >= pVictim->GetHealth())
|
||||
DoneTotalMod *= (100.0f+(*i)->GetAmount())/100.0f;
|
||||
}
|
||||
@@ -11367,7 +11367,7 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy)
|
||||
this->ToCreature()->SetHomePosition(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
|
||||
|
||||
if (enemy)
|
||||
{
|
||||
{
|
||||
if (IsAIEnabled)
|
||||
{
|
||||
this->ToCreature()->AI()->EnterCombat(enemy);
|
||||
@@ -11915,7 +11915,7 @@ void Unit::SetHover(bool on)
|
||||
|
||||
void Unit::setDeathState(DeathState s)
|
||||
{
|
||||
// death state needs to be updated before RemoveAllAurasOnDeath() calls HandleChannelDeathItem(..) so that
|
||||
// death state needs to be updated before RemoveAllAurasOnDeath() calls HandleChannelDeathItem(..) so that
|
||||
// it can be used to check creation of death items (such as soul shards).
|
||||
DeathState oldDeathState = m_deathState;
|
||||
m_deathState = s;
|
||||
@@ -14317,7 +14317,7 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellEntry co
|
||||
if (EventProcFlag & PROC_FLAG_KILL && GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
bool allow = false;
|
||||
|
||||
|
||||
if (pVictim)
|
||||
allow = ToPlayer()->isHonorOrXPTarget(pVictim);
|
||||
|
||||
@@ -14587,7 +14587,7 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
|
||||
|
||||
loot->generateMoneyLoot(creature->GetCreatureInfo()->mingold,creature->GetCreatureInfo()->maxgold);
|
||||
}
|
||||
|
||||
|
||||
player->RewardPlayerAndGroupAtKill(pVictim);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1852,7 +1852,7 @@ class Unit : public WorldObject
|
||||
static Creature* GetCreature(WorldObject& object, uint64 guid);
|
||||
|
||||
MotionMaster* GetMotionMaster(){ return &i_motionMaster; }
|
||||
|
||||
|
||||
bool IsStopped() const { return !(hasUnitState(UNIT_STAT_MOVING)); }
|
||||
void StopMoving();
|
||||
|
||||
|
||||
+2
-2
@@ -1147,7 +1147,7 @@ void World::LoadConfigSettings(bool reload)
|
||||
|
||||
m_visibility_notify_periodOnContinents = sConfig.GetIntDefault("Visibility.Notify.Period.OnContinents", DEFAULT_VISIBILITY_NOTIFY_PERIOD);
|
||||
m_visibility_notify_periodInInstances = sConfig.GetIntDefault("Visibility.Notify.Period.InInstances", DEFAULT_VISIBILITY_NOTIFY_PERIOD);
|
||||
m_visibility_notify_periodInBGArenas = sConfig.GetIntDefault("Visibility.Notify.Period.InBGArenas", DEFAULT_VISIBILITY_NOTIFY_PERIOD);
|
||||
m_visibility_notify_periodInBGArenas = sConfig.GetIntDefault("Visibility.Notify.Period.InBGArenas", DEFAULT_VISIBILITY_NOTIFY_PERIOD);
|
||||
|
||||
///- Read the "Data" directory from the config file
|
||||
std::string dataPath = sConfig.GetStringDefault("DataDir","./");
|
||||
@@ -2593,7 +2593,7 @@ void World::UpdateAreaDependentAuras()
|
||||
}
|
||||
|
||||
void World::LoadWorldStates()
|
||||
{
|
||||
{
|
||||
QueryResult_AutoPtr result = CharacterDatabase.Query("SELECT entry, value FROM worldstates");
|
||||
|
||||
if (!result)
|
||||
|
||||
+1
-1
@@ -683,7 +683,7 @@ class World
|
||||
float rate_values[MAX_RATES];
|
||||
uint32 m_configs[CONFIG_VALUE_COUNT];
|
||||
typedef std::map<uint32,uint64> WorldStatesMap;
|
||||
WorldStatesMap m_worldstates;
|
||||
WorldStatesMap m_worldstates;
|
||||
int32 m_playerLimit;
|
||||
AccountTypes m_allowedSecurityLevel;
|
||||
LocaleConstant m_defaultDbcLocale; // from config for one from loaded DBC locales
|
||||
|
||||
@@ -411,7 +411,7 @@ int WorldSocket::Update (void)
|
||||
if (m_TimeOutTime &&
|
||||
time(NULL) >= m_TimeOutTime)
|
||||
return -1;
|
||||
|
||||
|
||||
if (m_OutActive || m_OutBuffer->length () == 0)
|
||||
return 0;
|
||||
|
||||
@@ -837,7 +837,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
|
||||
locale = LOCALE_enUS;
|
||||
|
||||
// Checks gmlevel per Realm
|
||||
result =
|
||||
result =
|
||||
loginDatabase.PQuery ("SELECT "
|
||||
"RealmID, " //0
|
||||
"gmlevel " //1
|
||||
@@ -1064,7 +1064,7 @@ int WorldSocket::iSendPartialPacket(WorldPacket& pct)
|
||||
if (m_OutBuffer->copy((char*) (pct.contents() + pct.rpos()), remainingLen) == -1)
|
||||
ACE_ASSERT (false);
|
||||
|
||||
return 1; // some byte written and packet completed
|
||||
return 1; // some byte written and packet completed
|
||||
}
|
||||
|
||||
bool WorldSocket::iFlushPacketQueue()
|
||||
@@ -1076,7 +1076,7 @@ bool WorldSocket::iFlushPacketQueue()
|
||||
{
|
||||
int result = iSendPartialPacket(*pct);
|
||||
|
||||
if (result != 0)
|
||||
if (result != 0)
|
||||
{
|
||||
// some bytes were written
|
||||
haveone = true;
|
||||
|
||||
@@ -175,7 +175,7 @@ class WorldSocket : protected WorldHandler
|
||||
/// Need to be called with m_OutBufferLock lock held
|
||||
int iSendPacket (const WorldPacket& pct);
|
||||
|
||||
/// Try to write WorldPacket to m_OutBuffer even partially,
|
||||
/// Try to write WorldPacket to m_OutBuffer even partially,
|
||||
/// Need to be called with m_OutBufferLock lock held
|
||||
int iSendPartialPacket(WorldPacket& pct);
|
||||
|
||||
@@ -232,8 +232,8 @@ class WorldSocket : protected WorldHandler
|
||||
bool m_OutActive;
|
||||
|
||||
uint32 m_Seed;
|
||||
|
||||
/// The defined time where the socket will be forced to close. This is
|
||||
|
||||
/// The defined time where the socket will be forced to close. This is
|
||||
/// to detect and close idle connections.
|
||||
time_t m_TimeOutTime;
|
||||
};
|
||||
|
||||
@@ -49,7 +49,7 @@ enum Creatures
|
||||
struct mob_av_marshal_or_warmasterAI : public ScriptedAI
|
||||
{
|
||||
mob_av_marshal_or_warmasterAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
|
||||
uint32 uiChargeTimer;
|
||||
uint32 uiCleaveTimer;
|
||||
uint32 uiDemoralizingShoutTimer;
|
||||
@@ -57,7 +57,7 @@ struct mob_av_marshal_or_warmasterAI : public ScriptedAI
|
||||
uint32 uiWhirlwind2Timer;
|
||||
uint32 uiEnrageTimer;
|
||||
uint32 uiResetTimer;
|
||||
|
||||
|
||||
bool bHasAura;
|
||||
|
||||
void Reset()
|
||||
@@ -72,12 +72,12 @@ struct mob_av_marshal_or_warmasterAI : public ScriptedAI
|
||||
|
||||
bHasAura = false;
|
||||
}
|
||||
|
||||
|
||||
void JustRespawned()
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!bHasAura)
|
||||
@@ -112,47 +112,47 @@ struct mob_av_marshal_or_warmasterAI : public ScriptedAI
|
||||
|
||||
bHasAura = true;
|
||||
}
|
||||
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
|
||||
if (uiChargeTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_CHARGE);
|
||||
uiChargeTimer = urand(10*IN_MILISECONDS,25*IN_MILISECONDS);
|
||||
} else uiChargeTimer -= diff;
|
||||
|
||||
|
||||
if (uiCleaveTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_CLEAVE);
|
||||
uiCleaveTimer = urand(10*IN_MILISECONDS,16*IN_MILISECONDS);
|
||||
} else uiCleaveTimer -= diff;
|
||||
|
||||
|
||||
if (uiDemoralizingShoutTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_DEMORALIZING_SHOUT);
|
||||
uiDemoralizingShoutTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS);
|
||||
} else uiDemoralizingShoutTimer -= diff;
|
||||
|
||||
|
||||
if (uiWhirlwind1Timer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_WHIRLWIND1);
|
||||
uiWhirlwind1Timer = urand(6*IN_MILISECONDS,20*IN_MILISECONDS);
|
||||
} else uiWhirlwind1Timer -= diff;
|
||||
|
||||
|
||||
if (uiWhirlwind2Timer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_WHIRLWIND2);
|
||||
uiWhirlwind2Timer = urand(10*IN_MILISECONDS,25*IN_MILISECONDS);
|
||||
} else uiWhirlwind2Timer -= diff;
|
||||
|
||||
|
||||
if (uiEnrageTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_ENRAGE);
|
||||
uiEnrageTimer = urand(10*IN_MILISECONDS,30*IN_MILISECONDS);
|
||||
}else uiEnrageTimer -= diff;
|
||||
|
||||
|
||||
|
||||
|
||||
// check if creature is not outside of building
|
||||
if(uiResetTimer <= diff)
|
||||
{
|
||||
@@ -160,7 +160,7 @@ struct mob_av_marshal_or_warmasterAI : public ScriptedAI
|
||||
EnterEvadeMode();
|
||||
uiResetTimer = 5*IN_MILISECONDS;
|
||||
} else uiResetTimer -= diff;
|
||||
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -43,11 +43,11 @@ enum WaterElementalSpells
|
||||
struct mob_water_elementalAI : public ScriptedAI
|
||||
{
|
||||
mob_water_elementalAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
|
||||
uint32 uiWaterBoltTimer;
|
||||
uint64 uiBalindaGUID;
|
||||
uint32 uiResetTimer;
|
||||
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiWaterBoltTimer = 3*IN_MILISECONDS;
|
||||
@@ -58,13 +58,13 @@ struct mob_water_elementalAI : public ScriptedAI
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
|
||||
if(uiWaterBoltTimer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_WATERBOLT);
|
||||
uiWaterBoltTimer = 5*IN_MILISECONDS;
|
||||
} else uiWaterBoltTimer -= diff;
|
||||
|
||||
|
||||
// check if creature is not outside of building
|
||||
if(uiResetTimer < diff)
|
||||
{
|
||||
@@ -73,7 +73,7 @@ struct mob_water_elementalAI : public ScriptedAI
|
||||
EnterEvadeMode();
|
||||
uiResetTimer = 5*IN_MILISECONDS;
|
||||
} else uiResetTimer -= diff;
|
||||
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
@@ -88,7 +88,7 @@ struct boss_balindaAI : public ScriptedAI
|
||||
uint32 uiFrostboltTimer;
|
||||
uint32 uiResetTimer;
|
||||
uint32 uiWaterElementalTimer;
|
||||
|
||||
|
||||
SummonList Summons;
|
||||
|
||||
void Reset()
|
||||
@@ -117,7 +117,7 @@ struct boss_balindaAI : public ScriptedAI
|
||||
{
|
||||
((mob_water_elementalAI*)summoned->AI())->uiBalindaGUID = m_creature->GetGUID();
|
||||
summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM,0, 50, true));
|
||||
summoned->setFaction(m_creature->getFaction());
|
||||
summoned->setFaction(m_creature->getFaction());
|
||||
Summons.Summon(summoned);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ enum eEnums
|
||||
NPC_SEETHREL = 9038,
|
||||
NPC_GLOOMREL = 9037,
|
||||
NPC_DOOMREL = 9039,
|
||||
NPC_MAGMUS = 9938,
|
||||
NPC_MAGMUS = 9938,
|
||||
|
||||
GO_ARENA1 = 161525,
|
||||
GO_ARENA2 = 161522,
|
||||
@@ -164,7 +164,7 @@ struct instance_blackrock_depths : public ScriptedInstance
|
||||
case NPC_SEETHREL: TombBossGUIDs[4] = pCreature->GetGUID(); break;
|
||||
case NPC_GLOOMREL: TombBossGUIDs[5] = pCreature->GetGUID(); break;
|
||||
case NPC_ANGERREL: TombBossGUIDs[6] = pCreature->GetGUID(); break;
|
||||
case NPC_MAGMUS:
|
||||
case NPC_MAGMUS:
|
||||
MagmusGUID = pCreature->GetGUID();
|
||||
if(!pCreature->isAlive())
|
||||
HandleGameObject(GetData64(DATA_THRONE_DOOR), true); // if Magmus is dead open door to last boss
|
||||
|
||||
@@ -28,9 +28,9 @@ struct npc_rookey_whelpAI : public ScriptedAI
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
|
||||
void JustDied(Unit *who)
|
||||
{
|
||||
if (pInstance)
|
||||
@@ -38,12 +38,12 @@ struct npc_rookey_whelpAI : public ScriptedAI
|
||||
pInstance->SetData(WHELP_DEATH_COUNT, pInstance->GetData(WHELP_DEATH_COUNT)+1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
@@ -72,7 +72,7 @@ void AddSC_blackrock_spire()
|
||||
newscript->GetAI = &GetAI_rookey_whelp;
|
||||
newscript->RegisterSelf();
|
||||
newscript = new Script;
|
||||
|
||||
|
||||
newscript->Name = "go_rookey_egg";
|
||||
newscript->pGOHello = &GOHello_rookey_egg;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
@@ -21,6 +21,6 @@ enum Data
|
||||
{
|
||||
EVENT_LEEEROY,
|
||||
WHELP_DEATH_COUNT
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,13 +25,13 @@ enum Achievements
|
||||
struct instance_blackrock_spire : public ScriptedInstance
|
||||
{
|
||||
instance_blackrock_spire(Map* pMap) : ScriptedInstance(pMap) {}
|
||||
|
||||
|
||||
uint32 uiLeeroyTimer;
|
||||
uint32 uiWhelpCount;
|
||||
uint32 uiLeroyData;
|
||||
|
||||
|
||||
bool bLeeeeeeeeroy;
|
||||
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiLeeroyTimer = 15*IN_MILISECONDS;
|
||||
@@ -39,7 +39,7 @@ struct instance_blackrock_spire : public ScriptedInstance
|
||||
bLeeeeeeeeroy = true;
|
||||
uiLeroyData = 0;
|
||||
}
|
||||
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
switch(type)
|
||||
@@ -57,7 +57,7 @@ struct instance_blackrock_spire : public ScriptedInstance
|
||||
}
|
||||
uiWhelpCount = data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
@@ -71,7 +71,7 @@ struct instance_blackrock_spire : public ScriptedInstance
|
||||
}
|
||||
|
||||
void Update(uint32 diff)
|
||||
{
|
||||
{
|
||||
if (GetData(EVENT_LEEEROY) != FAIL && GetData(EVENT_LEEEROY) == IN_PROGRESS)
|
||||
{
|
||||
if (uiLeeroyTimer <= diff)
|
||||
|
||||
@@ -270,7 +270,7 @@ struct boss_selin_fireheartAI : public ScriptedAI
|
||||
if (DrainCrystalTimer <= diff)
|
||||
{
|
||||
SelectNearestCrystal();
|
||||
if (IsHeroic())
|
||||
if (IsHeroic())
|
||||
DrainCrystalTimer = 10000 + rand()%5000;
|
||||
else
|
||||
DrainCrystalTimer = 20000 + rand()%5000;
|
||||
|
||||
@@ -85,11 +85,11 @@ struct npc_valkyr_battle_maidenAI : public PassiveAI
|
||||
FlyBackTimer = 5000;
|
||||
break;
|
||||
case 3:
|
||||
me->SetVisibility(VISIBILITY_OFF);
|
||||
FlyBackTimer = 3000;
|
||||
me->SetVisibility(VISIBILITY_OFF);
|
||||
FlyBackTimer = 3000;
|
||||
break;
|
||||
case 4:
|
||||
me->DisappearAndDie();
|
||||
me->DisappearAndDie();
|
||||
break;
|
||||
default:
|
||||
//Nothing To DO
|
||||
|
||||
@@ -147,26 +147,26 @@ struct instance_stratholme : public ScriptedInstance
|
||||
{
|
||||
switch(pGo->GetEntry())
|
||||
{
|
||||
case GO_SERVICE_ENTRANCE:
|
||||
serviceEntranceGUID = pGo->GetGUID();
|
||||
case GO_SERVICE_ENTRANCE:
|
||||
serviceEntranceGUID = pGo->GetGUID();
|
||||
break;
|
||||
case GO_GAUNTLET_GATE1:
|
||||
//weird, but unless flag is set, client will not respond as expected. DB bug?
|
||||
pGo->SetFlag(GAMEOBJECT_FLAGS,GO_FLAG_LOCKED);
|
||||
gauntletGate1GUID = pGo->GetGUID();
|
||||
break;
|
||||
case GO_ZIGGURAT1:
|
||||
ziggurat1GUID = pGo->GetGUID();
|
||||
case GO_ZIGGURAT1:
|
||||
ziggurat1GUID = pGo->GetGUID();
|
||||
if (GetData(TYPE_BARONESS) == IN_PROGRESS)
|
||||
HandleGameObject(0, true, pGo);
|
||||
break;
|
||||
case GO_ZIGGURAT2:
|
||||
ziggurat2GUID = pGo->GetGUID();
|
||||
case GO_ZIGGURAT2:
|
||||
ziggurat2GUID = pGo->GetGUID();
|
||||
if (GetData(TYPE_NERUB) == IN_PROGRESS)
|
||||
HandleGameObject(0, true, pGo);
|
||||
break;
|
||||
case GO_ZIGGURAT3:
|
||||
ziggurat3GUID = pGo->GetGUID();
|
||||
case GO_ZIGGURAT3:
|
||||
ziggurat3GUID = pGo->GetGUID();
|
||||
if (GetData(TYPE_PALLID) == IN_PROGRESS)
|
||||
HandleGameObject(0, true, pGo);
|
||||
break;
|
||||
@@ -180,18 +180,18 @@ struct instance_stratholme : public ScriptedInstance
|
||||
if (GetData(TYPE_BARON) == DONE || GetData(TYPE_RAMSTEIN) == DONE)
|
||||
HandleGameObject(0, true, pGo);
|
||||
break;
|
||||
case GO_PORT_GAUNTLET:
|
||||
portGauntletGUID = pGo->GetGUID();
|
||||
case GO_PORT_GAUNTLET:
|
||||
portGauntletGUID = pGo->GetGUID();
|
||||
if (GetData(TYPE_BARONESS) == IN_PROGRESS && GetData(TYPE_NERUB) == IN_PROGRESS && GetData(TYPE_PALLID) == IN_PROGRESS)
|
||||
HandleGameObject(0, true, pGo);
|
||||
break;
|
||||
case GO_PORT_SLAUGTHER:
|
||||
portSlaugtherGUID = pGo->GetGUID();
|
||||
case GO_PORT_SLAUGTHER:
|
||||
portSlaugtherGUID = pGo->GetGUID();
|
||||
if (GetData(TYPE_BARONESS) == IN_PROGRESS && GetData(TYPE_NERUB) == IN_PROGRESS && GetData(TYPE_PALLID) == IN_PROGRESS)
|
||||
HandleGameObject(0, true, pGo);
|
||||
break;
|
||||
case GO_PORT_ELDERS:
|
||||
portElderGUID = pGo->GetGUID();
|
||||
case GO_PORT_ELDERS:
|
||||
portElderGUID = pGo->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,9 +99,9 @@ struct boss_brutallusAI : public ScriptedAI
|
||||
IntroFrostBoltTimer = 0;
|
||||
|
||||
IsIntro = false;
|
||||
Enraged = false;
|
||||
Enraged = false;
|
||||
|
||||
DoCast(m_creature, SPELL_DUAL_WIELD, true);
|
||||
DoCast(m_creature, SPELL_DUAL_WIELD, true);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_BRUTALLUS_EVENT, NOT_STARTED);
|
||||
@@ -151,7 +151,7 @@ struct boss_brutallusAI : public ScriptedAI
|
||||
Madrigosa->setActive(true);
|
||||
IsIntro = true;
|
||||
Madrigosa->SetMaxHealth(m_creature->GetMaxHealth());
|
||||
Madrigosa->SetHealth(m_creature->GetMaxHealth());
|
||||
Madrigosa->SetHealth(m_creature->GetMaxHealth());
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
m_creature->Attack(Madrigosa, true);
|
||||
Madrigosa->Attack(m_creature, true);
|
||||
|
||||
@@ -25,7 +25,7 @@ EndScriptData */
|
||||
npcs_dithers_and_arbington
|
||||
npc_myranda_the_hag
|
||||
npc_the_scourge_cauldron
|
||||
npc_andorhal_tower
|
||||
npc_andorhal_tower
|
||||
EndContentData */
|
||||
|
||||
#include "ScriptedPch.h"
|
||||
@@ -206,7 +206,7 @@ CreatureAI* GetAI_npc_the_scourge_cauldron(Creature* pCreature)
|
||||
}
|
||||
|
||||
/*######
|
||||
## npcs_andorhal_tower
|
||||
## npcs_andorhal_tower
|
||||
######*/
|
||||
|
||||
enum eAndorhalTower
|
||||
|
||||
@@ -55,7 +55,7 @@ enum Yells
|
||||
|
||||
enum Spells
|
||||
{
|
||||
// List of spells.
|
||||
// List of spells.
|
||||
// Not required to define them in this way, but will make it easier to maintain in case spellId change
|
||||
SPELL_BUFF = 25661,
|
||||
SPELL_ONE = 12555,
|
||||
|
||||
@@ -31,12 +31,12 @@ struct boss_aku_maiAI : public ScriptedAI
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
|
||||
uint32 uiPoisonCloudTimer;
|
||||
bool bIsEnraged;
|
||||
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiPoisonCloudTimer = urand(5000,9000);
|
||||
@@ -44,24 +44,24 @@ struct boss_aku_maiAI : public ScriptedAI
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_AKU_MAI, NOT_STARTED);
|
||||
}
|
||||
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_AKU_MAI, IN_PROGRESS);
|
||||
}
|
||||
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_AKU_MAI, DONE);
|
||||
}
|
||||
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
|
||||
if (uiPoisonCloudTimer < diff)
|
||||
{
|
||||
DoCastVictim(SPELL_POISON_CLOUD);
|
||||
@@ -73,7 +73,7 @@ struct boss_aku_maiAI : public ScriptedAI
|
||||
DoCast(m_creature,SPELL_FRENZIED_RAGE);
|
||||
bIsEnraged = true;
|
||||
}
|
||||
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
@@ -86,7 +86,7 @@ CreatureAI* GetAI_boss_aku_mai(Creature* pCreature)
|
||||
void AddSC_boss_aku_mai()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_aku_mai";
|
||||
newscript->GetAI = &GetAI_boss_aku_mai;
|
||||
|
||||
@@ -64,7 +64,7 @@ struct boss_gelihastAI : public ScriptedAI
|
||||
DoCastVictim(SPELL_NET);
|
||||
uiNetTimer = urand(4000,7000);
|
||||
} else uiNetTimer -= diff;
|
||||
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -75,7 +75,7 @@ struct boss_epochAI : public ScriptedAI
|
||||
uiTimeWarpTimer = 25300;
|
||||
uiTimeStopTimer = 21300;
|
||||
uiWoundingStrikeTimer = 5300;
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_EPOCH_EVENT, NOT_STARTED);
|
||||
}
|
||||
@@ -83,7 +83,7 @@ struct boss_epochAI : public ScriptedAI
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_EPOCH_EVENT, IN_PROGRESS);
|
||||
}
|
||||
@@ -126,7 +126,7 @@ struct boss_epochAI : public ScriptedAI
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_EPOCH_EVENT, DONE);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ struct boss_infinite_corruptorAI : public ScriptedAI
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
void Reset()
|
||||
@@ -47,7 +47,7 @@ struct boss_infinite_corruptorAI : public ScriptedAI
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_INFINITE_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (pInstance)
|
||||
@@ -64,7 +64,7 @@ struct boss_infinite_corruptorAI : public ScriptedAI
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (pInstance)
|
||||
|
||||
@@ -87,7 +87,7 @@ struct boss_mal_ganisAI : public ScriptedAI
|
||||
bool bYelled2;
|
||||
|
||||
CombatPhases Phase;
|
||||
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
void Reset()
|
||||
@@ -100,7 +100,7 @@ struct boss_mal_ganisAI : public ScriptedAI
|
||||
uiVampiricTouchTimer = urand(10000,15000);
|
||||
uiSleepTimer = urand(15000,20000);
|
||||
uiOutroTimer = 1000;
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MAL_GANIS_EVENT, NOT_STARTED);
|
||||
}
|
||||
@@ -218,7 +218,7 @@ struct boss_mal_ganisAI : public ScriptedAI
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
m_creature->Kill(m_creature);
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
} else uiOutroTimer -= diff;
|
||||
break;
|
||||
|
||||
@@ -48,7 +48,7 @@ enum Yells
|
||||
|
||||
struct boss_meathookAI : public ScriptedAI
|
||||
{
|
||||
boss_meathookAI(Creature *c) : ScriptedAI(c)
|
||||
boss_meathookAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
if (pInstance)
|
||||
@@ -58,7 +58,7 @@ struct boss_meathookAI : public ScriptedAI
|
||||
uint32 uiChainTimer;
|
||||
uint32 uiDiseaseTimer;
|
||||
uint32 uiFrenzyTimer;
|
||||
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
void Reset()
|
||||
@@ -66,7 +66,7 @@ struct boss_meathookAI : public ScriptedAI
|
||||
uiChainTimer = urand(12000,17000); //seen on video 13, 17, 15, 12, 16
|
||||
uiDiseaseTimer = urand(2000,4000); //approx 3s
|
||||
uiFrenzyTimer = urand(21000,26000); //made it up
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MEATHOOK_EVENT, NOT_STARTED);
|
||||
}
|
||||
@@ -74,7 +74,7 @@ struct boss_meathookAI : public ScriptedAI
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MEATHOOK_EVENT, IN_PROGRESS);
|
||||
}
|
||||
@@ -110,7 +110,7 @@ struct boss_meathookAI : public ScriptedAI
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MEATHOOK_EVENT, DONE);
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ struct boss_salrammAI : public ScriptedAI
|
||||
uint32 uiShadowBoltTimer;
|
||||
uint32 uiStealFleshTimer;
|
||||
uint32 uiSummonGhoulsTimer;
|
||||
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
void Reset()
|
||||
@@ -82,7 +82,7 @@ struct boss_salrammAI : public ScriptedAI
|
||||
uiShadowBoltTimer = urand(8000,12000); // approx 10s
|
||||
uiStealFleshTimer = 12345;
|
||||
uiSummonGhoulsTimer = urand(19000,24000); //on a video approx 24s after aggro
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_SALRAMM_EVENT, NOT_STARTED);
|
||||
}
|
||||
@@ -90,7 +90,7 @@ struct boss_salrammAI : public ScriptedAI
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_SALRAMM_EVENT, IN_PROGRESS);
|
||||
}
|
||||
@@ -140,7 +140,7 @@ struct boss_salrammAI : public ScriptedAI
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_SALRAMM_EVENT, DONE);
|
||||
}
|
||||
|
||||
+44
-44
@@ -248,21 +248,21 @@ struct npc_arthasAI : public npc_escortAI
|
||||
uint64 uiEpochGUID;
|
||||
uint64 uiMalganisGUID;
|
||||
uint64 uiInfiniteGUID;
|
||||
|
||||
|
||||
uint32 uiExorcismTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiUtherGUID = 0;
|
||||
uiJainaGUID = 0;
|
||||
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
uiCitymenGUID[i] = 0;
|
||||
|
||||
for (uint8 i = 0; i < ENCOUNTER_WAVES_MAX_SPAWNS; ++i)
|
||||
for (uint8 i = 0; i < ENCOUNTER_WAVES_MAX_SPAWNS; ++i)
|
||||
uiWaveGUID[i] = 0;
|
||||
|
||||
for (uint8 i = 0; i < ENCOUNTER_DRACONIAN_NUMBER; ++i)
|
||||
for (uint8 i = 0; i < ENCOUNTER_DRACONIAN_NUMBER; ++i)
|
||||
uiInfiniteDraconianGUID[i] = 0;
|
||||
|
||||
uiStalkerGUID = 0;
|
||||
@@ -283,7 +283,7 @@ struct npc_arthasAI : public npc_escortAI
|
||||
uiGossipStep = 0;
|
||||
break;
|
||||
}
|
||||
uiPhaseTimer = 1000;
|
||||
uiPhaseTimer = 1000;
|
||||
uiExorcismTimer = 7300;
|
||||
uiWave = 0;
|
||||
}
|
||||
@@ -299,7 +299,7 @@ struct npc_arthasAI : public npc_escortAI
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ARTHAS_EVENT, FAIL);
|
||||
}
|
||||
|
||||
|
||||
void SpawnTimeRift(uint32 timeRiftID, uint64* guidVector)
|
||||
{
|
||||
m_creature->SummonCreature((uint32)RiftAndSpawnsLocations[timeRiftID][0],RiftAndSpawnsLocations[timeRiftID][1],RiftAndSpawnsLocations[timeRiftID][2],RiftAndSpawnsLocations[timeRiftID][3],RiftAndSpawnsLocations[timeRiftID][4],TEMPSUMMON_TIMED_DESPAWN,11000);
|
||||
@@ -380,7 +380,7 @@ struct npc_arthasAI : public npc_escortAI
|
||||
if (Unit* pDisguised1 = m_creature->SummonCreature(NPC_CITY_MAN4,2403.22f,1205.54f,134.04f,3.311264f,TEMPSUMMON_DEAD_DESPAWN,180000))
|
||||
{
|
||||
uiInfiniteDraconianGUID[1] = pDisguised1->GetGUID();
|
||||
|
||||
|
||||
if (Unit* pDisguised2 = m_creature->SummonCreature(NPC_CITY_MAN,2400.82f,1201.69f,134.01f,1.534082f,TEMPSUMMON_DEAD_DESPAWN,180000))
|
||||
{
|
||||
uiInfiniteDraconianGUID[2] = pDisguised2->GetGUID();
|
||||
@@ -733,8 +733,8 @@ struct npc_arthasAI : public npc_escortAI
|
||||
pZombie->UpdateEntry(NPC_ZOMBIE, 0);
|
||||
else //There's no one else to transform
|
||||
uiStep++;
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
uiStep++;
|
||||
uiPhaseTimer = 500;
|
||||
break;
|
||||
@@ -742,7 +742,7 @@ struct npc_arthasAI : public npc_escortAI
|
||||
if (Creature* pMalganis = Unit::GetCreature(*me, uiMalganisGUID))
|
||||
DoScriptText(SAY_PHASE207, pMalganis);
|
||||
JumpToNextStep(17000);
|
||||
break;
|
||||
break;
|
||||
case 39:
|
||||
if (Creature* pMalganis = Unit::GetCreature(*me, uiMalganisGUID))
|
||||
pMalganis->SetVisibility(VISIBILITY_OFF);
|
||||
@@ -760,7 +760,7 @@ struct npc_arthasAI : public npc_escortAI
|
||||
uiBossEvent = DATA_MEATHOOK_EVENT;
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ARTHAS_EVENT, IN_PROGRESS);
|
||||
|
||||
|
||||
m_creature->SetReactState(REACT_DEFENSIVE);
|
||||
SetDespawnAtFar(false);
|
||||
JumpToNextStep(5000);
|
||||
@@ -794,11 +794,11 @@ struct npc_arthasAI : public npc_escortAI
|
||||
uint32 deadCounter = 0;
|
||||
for (uint8 i = 0; i < ENCOUNTER_WAVES_MAX_SPAWNS; ++i)
|
||||
{
|
||||
if (uiWaveGUID[i] == 0)
|
||||
if (uiWaveGUID[i] == 0)
|
||||
break;
|
||||
++mobCounter;
|
||||
Unit* pTemp = Unit::GetCreature(*me, uiWaveGUID[i]);
|
||||
if (!pTemp || pTemp->isDead())
|
||||
if (!pTemp || pTemp->isDead())
|
||||
++deadCounter;
|
||||
}
|
||||
|
||||
@@ -806,8 +806,8 @@ struct npc_arthasAI : public npc_escortAI
|
||||
JumpToNextStep(1000);
|
||||
else
|
||||
uiPhaseTimer = 1000;
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
JumpToNextStep(500);
|
||||
break;
|
||||
case 49: //Summon Boss
|
||||
@@ -821,7 +821,7 @@ struct npc_arthasAI : public npc_escortAI
|
||||
uiBossID = NPC_SALRAMM;
|
||||
|
||||
if (Unit* pBoss = m_creature->SummonCreature(uiBossID,2232.19f,1331.933f,126.662f,3.15f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000))
|
||||
{
|
||||
{
|
||||
uiBossGUID = pBoss->GetGUID();
|
||||
pBoss->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
pBoss->GetMotionMaster()->MovePoint(0, 2194.110f,1332.00f,130.00f);
|
||||
@@ -841,13 +841,13 @@ struct npc_arthasAI : public npc_escortAI
|
||||
else if (uiBossEvent == DATA_SALRAMM_EVENT)
|
||||
{
|
||||
SetHoldState(false);
|
||||
bStepping = false;
|
||||
bStepping = false;
|
||||
uiBossEvent = DATA_EPOCH_EVENT;
|
||||
}
|
||||
}
|
||||
else if (pInstance->GetData(uiBossEvent) == FAIL)
|
||||
}
|
||||
else if (pInstance->GetData(uiBossEvent) == FAIL)
|
||||
npc_escortAI::EnterEvadeMode();
|
||||
else
|
||||
else
|
||||
uiPhaseTimer = 10000;
|
||||
}
|
||||
break;
|
||||
@@ -866,7 +866,7 @@ struct npc_arthasAI : public npc_escortAI
|
||||
if (Creature* pDisguised0 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[0]))
|
||||
DoScriptText(SAY_PHASE302, pDisguised0);
|
||||
JumpToNextStep(7000);
|
||||
break;
|
||||
break;
|
||||
case 63:
|
||||
DoScriptText(SAY_PHASE303, m_creature);
|
||||
SetHoldState(false);
|
||||
@@ -877,7 +877,7 @@ struct npc_arthasAI : public npc_escortAI
|
||||
case 64:
|
||||
m_creature->HandleEmoteCommand(54);
|
||||
JumpToNextStep(1000);
|
||||
break;
|
||||
break;
|
||||
case 65:
|
||||
if (Creature* pDisguised0 = Unit::GetCreature(*me, uiInfiniteDraconianGUID[0]))
|
||||
pDisguised0->HandleEmoteCommand(11);
|
||||
@@ -936,12 +936,12 @@ struct npc_arthasAI : public npc_escortAI
|
||||
}
|
||||
JumpToNextStep(5000);
|
||||
break;
|
||||
case 72:
|
||||
case 72:
|
||||
case 74:
|
||||
case 76:
|
||||
if (m_creature->isInCombat())
|
||||
uiPhaseTimer = 1000;
|
||||
else
|
||||
else
|
||||
{
|
||||
if (uiStep == 72) DoScriptText(SAY_PHASE308,m_creature);
|
||||
if (uiStep == 74) DoScriptText(SAY_PHASE308,m_creature);
|
||||
@@ -955,7 +955,7 @@ struct npc_arthasAI : public npc_escortAI
|
||||
case 78:
|
||||
if (m_creature->isInCombat())
|
||||
uiPhaseTimer = 1000;
|
||||
else
|
||||
else
|
||||
{
|
||||
DoScriptText(SAY_PHASE312,m_creature);
|
||||
JumpToNextStep(5000);
|
||||
@@ -975,7 +975,7 @@ struct npc_arthasAI : public npc_escortAI
|
||||
m_creature->SetUInt64Value(UNIT_FIELD_TARGET, uiEpochGUID);
|
||||
}
|
||||
JumpToNextStep(18000);
|
||||
break;
|
||||
break;
|
||||
case 81:
|
||||
if (pInstance)
|
||||
if (pInstance->GetData(DATA_EPOCH_EVENT) != DONE)
|
||||
@@ -990,13 +990,13 @@ struct npc_arthasAI : public npc_escortAI
|
||||
{
|
||||
//Make Epoch attackable
|
||||
pEpoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_UNK_9);
|
||||
pEpoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
pEpoch->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
pEpoch->SetReactState(REACT_AGGRESSIVE);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
JumpToNextStep(1000);
|
||||
break;
|
||||
break;
|
||||
case 83:
|
||||
if (pInstance)
|
||||
{
|
||||
@@ -1008,9 +1008,9 @@ struct npc_arthasAI : public npc_escortAI
|
||||
uiBossEvent = DATA_MAL_GANIS_EVENT;
|
||||
JumpToNextStep(15000);
|
||||
}
|
||||
else if (pInstance->GetData(DATA_EPOCH_EVENT) == FAIL)
|
||||
else if (pInstance->GetData(DATA_EPOCH_EVENT) == FAIL)
|
||||
npc_escortAI::EnterEvadeMode();
|
||||
else
|
||||
else
|
||||
uiPhaseTimer = 10000;
|
||||
}
|
||||
break;
|
||||
@@ -1032,7 +1032,7 @@ struct npc_arthasAI : public npc_escortAI
|
||||
{
|
||||
GameObject* pGate = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_MAL_GANIS_GATE_1));
|
||||
pGate->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
SetHoldState(false);
|
||||
bStepping = false;
|
||||
JumpToNextStep(0);
|
||||
@@ -1059,9 +1059,9 @@ struct npc_arthasAI : public npc_escortAI
|
||||
SetHoldState(false);
|
||||
JumpToNextStep(1000);
|
||||
}
|
||||
else if (pInstance->GetData(DATA_MAL_GANIS_EVENT) == FAIL)
|
||||
else if (pInstance->GetData(DATA_MAL_GANIS_EVENT) == FAIL)
|
||||
npc_escortAI::EnterEvadeMode();
|
||||
else
|
||||
else
|
||||
uiPhaseTimer = 10000;
|
||||
}
|
||||
break;
|
||||
@@ -1083,19 +1083,19 @@ struct npc_arthasAI : public npc_escortAI
|
||||
break;
|
||||
}
|
||||
} else uiPhaseTimer -= diff;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Battling skills
|
||||
if (!m_creature->getVictim())
|
||||
return;
|
||||
|
||||
|
||||
if (uiExorcismTimer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||
DoCast(target, DUNGEON_MODE(SPELL_EXORCISM_N, SPELL_EXORCISM_H));
|
||||
uiExorcismTimer = 7300;
|
||||
} else uiExorcismTimer -= diff;
|
||||
|
||||
|
||||
if (HealthBelowPct(40))
|
||||
DoCast(m_creature, SPELL_HOLY_LIGHT);
|
||||
}
|
||||
@@ -1116,7 +1116,7 @@ CreatureAI* GetAI_npc_arthas(Creature* pCreature)
|
||||
bool GossipHello_npc_arthas(Player* pPlayer, Creature* pCreature)
|
||||
{
|
||||
npc_arthasAI* pAI = CAST_AI(npc_arthasAI,pCreature->AI());
|
||||
|
||||
|
||||
if (pAI && pAI->bStepping == false)
|
||||
{
|
||||
switch (pAI->uiGossipStep)
|
||||
@@ -1161,7 +1161,7 @@ bool GossipSelect_npc_arthas(Player *pPlayer, Creature *pCreature, uint32 sender
|
||||
|
||||
if (!pAI)
|
||||
return false;
|
||||
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF:
|
||||
|
||||
@@ -46,7 +46,7 @@ enum Data64
|
||||
|
||||
enum Creatures
|
||||
{
|
||||
NPC_MEATHOOK = 26529,
|
||||
NPC_MEATHOOK = 26529,
|
||||
NPC_SALRAMM = 26530,
|
||||
NPC_EPOCH = 26532,
|
||||
NPC_MAL_GANIS = 26533,
|
||||
|
||||
+11
-11
@@ -24,15 +24,15 @@
|
||||
/* Culling of Stratholme encounters:
|
||||
0 - Meathook
|
||||
1 - Salramm the Fleshcrafter
|
||||
2 - Chrono-Lord Epoch
|
||||
3 - Mal'Ganis
|
||||
2 - Chrono-Lord Epoch
|
||||
3 - Mal'Ganis
|
||||
4 - Infinite Corruptor (Heroic only)
|
||||
*/
|
||||
|
||||
struct instance_culling_of_stratholme : public ScriptedInstance
|
||||
{
|
||||
instance_culling_of_stratholme(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
|
||||
|
||||
|
||||
uint64 uiArthas;
|
||||
uint64 uiMeathook;
|
||||
uint64 uiSalramm;
|
||||
@@ -45,10 +45,10 @@ struct instance_culling_of_stratholme : public ScriptedInstance
|
||||
uint64 uiMalGanisGate2;
|
||||
uint64 uiExitGate;
|
||||
uint64 uiMalGanisChest;
|
||||
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
std::string str_data;
|
||||
|
||||
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
@@ -56,7 +56,7 @@ struct instance_culling_of_stratholme : public ScriptedInstance
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool add)
|
||||
{
|
||||
switch(pCreature->GetEntry())
|
||||
@@ -108,7 +108,7 @@ struct instance_culling_of_stratholme : public ScriptedInstance
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
switch(type)
|
||||
@@ -144,11 +144,11 @@ struct instance_culling_of_stratholme : public ScriptedInstance
|
||||
m_auiEncounter[4] = data;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (data == DONE)
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
{
|
||||
switch(type)
|
||||
@@ -161,7 +161,7 @@ struct instance_culling_of_stratholme : public ScriptedInstance
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
uint64 GetData64(uint32 identifier)
|
||||
{
|
||||
switch(identifier)
|
||||
@@ -180,7 +180,7 @@ struct instance_culling_of_stratholme : public ScriptedInstance
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
std::string GetSaveData()
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
@@ -179,7 +179,7 @@ void AddSC_desolace()
|
||||
newscript->pEffectDummyCreature = &EffectDummyCreature_npc_aged_dying_ancient_kodo;
|
||||
newscript->pGossipHello = &GossipHello_npc_aged_dying_ancient_kodo;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "go_iruxos";
|
||||
newscript->pGOHello = &GOHello_go_iruxos;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
*/
|
||||
|
||||
#include "ScriptedPch.h"
|
||||
|
||||
@@ -39,24 +39,24 @@ enum LazyPeon
|
||||
struct npc_lazy_peonAI : public ScriptedAI
|
||||
{
|
||||
npc_lazy_peonAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
|
||||
uint64 uiPlayerGUID;
|
||||
|
||||
|
||||
uint32 m_uiRebuffTimer;
|
||||
uint32 work;
|
||||
|
||||
|
||||
void Reset ()
|
||||
{
|
||||
uiPlayerGUID = 0;
|
||||
work = false;
|
||||
}
|
||||
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
if (id == 1)
|
||||
work = true;
|
||||
}
|
||||
|
||||
|
||||
void SpellHit(Unit *caster, const SpellEntry *spell)
|
||||
{
|
||||
if (spell->Id == SPELL_AWAKEN_PEON && caster->GetTypeId() == TYPEID_PLAYER
|
||||
@@ -69,7 +69,7 @@ struct npc_lazy_peonAI : public ScriptedAI
|
||||
m_creature->GetMotionMaster()->MovePoint(1,Lumberpile->GetPositionX()-1,Lumberpile->GetPositionY(),Lumberpile->GetPositionZ());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (work = true)
|
||||
@@ -95,7 +95,7 @@ CreatureAI* GetAI_npc_lazy_peon(Creature* pCreature)
|
||||
void AddSC_durotar()
|
||||
{
|
||||
Script* newscript;
|
||||
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_lazy_peon";
|
||||
newscript->GetAI = &GetAI_npc_lazy_peon;
|
||||
|
||||
@@ -109,7 +109,7 @@ struct instance_razorfen_downs : public ScriptedInstance
|
||||
if (uiType == DATA_GONG_WAVES)
|
||||
{
|
||||
uiGongWaves = uiData;
|
||||
|
||||
|
||||
switch(uiGongWaves)
|
||||
{
|
||||
case 9:
|
||||
@@ -127,10 +127,10 @@ struct instance_razorfen_downs : public ScriptedInstance
|
||||
return;
|
||||
|
||||
pGo->SetFlag(GAMEOBJECT_FLAGS,GO_FLAG_UNK1);
|
||||
|
||||
|
||||
uint32 uiCreature = 0;
|
||||
uint8 uiSummonTimes = 0;
|
||||
|
||||
|
||||
switch(uiGongWaves)
|
||||
{
|
||||
case 1:
|
||||
@@ -147,7 +147,7 @@ struct instance_razorfen_downs : public ScriptedInstance
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (Creature* pCreature = pGo->SummonCreature(uiCreature,2502.635,844.140,46.896,0.633))
|
||||
{
|
||||
|
||||
@@ -117,7 +117,7 @@ struct npc_tomb_creatureAI : public ScriptedAI
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
|
||||
//from acid
|
||||
if (m_creature->GetEntry() == CREATURE_TOMB_REAVER)
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@ struct boss_ayamissAI : public ScriptedAI
|
||||
uint32 POISONSTINGER_Timer;
|
||||
uint32 SUMMONSWARMER_Timer;
|
||||
uint32 phase;
|
||||
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
void Reset()
|
||||
@@ -57,7 +57,7 @@ struct boss_ayamissAI : public ScriptedAI
|
||||
POISONSTINGER_Timer = 30000;
|
||||
SUMMONSWARMER_Timer = 60000;
|
||||
phase=1;
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_AYAMISS_EVENT, NOT_STARTED);
|
||||
}
|
||||
@@ -67,7 +67,7 @@ struct boss_ayamissAI : public ScriptedAI
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_AYAMISS_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
if (pInstance)
|
||||
|
||||
@@ -35,21 +35,21 @@ struct boss_buruAI : public ScriptedAI
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_BURU_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_BURU_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
if (pInstance)
|
||||
|
||||
@@ -40,14 +40,14 @@ struct boss_kurinnaxxAI : public ScriptedAI
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
|
||||
uint32 uiMortalWoundTimer;
|
||||
uint32 uiSandtrapTimer;
|
||||
uint32 uiWideSlashTimer;
|
||||
uint32 uiSummonPlayerTimer;
|
||||
uint32 uiTrashTimer;
|
||||
bool bIsEnraged;
|
||||
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
void Reset()
|
||||
@@ -58,17 +58,17 @@ struct boss_kurinnaxxAI : public ScriptedAI
|
||||
uiWideSlashTimer = urand(10000,15000);
|
||||
uiTrashTimer = urand(20000,25000);
|
||||
uiSummonPlayerTimer = urand(30000,40000);
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_KURINNAXX_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_KURINNAXX_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
if (pInstance)
|
||||
@@ -101,21 +101,21 @@ struct boss_kurinnaxxAI : public ScriptedAI
|
||||
DoCast(pTarget, SPELL_SANDTRAP);
|
||||
uiSandtrapTimer = 30000;
|
||||
} else uiSandtrapTimer -= diff;
|
||||
|
||||
|
||||
//Wide Slash spell
|
||||
if (uiWideSlashTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_WIDE_SLASH);
|
||||
uiWideSlashTimer = urand(10000,15000);
|
||||
} else uiWideSlashTimer -= diff;
|
||||
|
||||
|
||||
//Trash spell
|
||||
if (uiTrashTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_TRASH);
|
||||
uiTrashTimer = urand(20000,25000);
|
||||
} else uiTrashTimer -= diff;
|
||||
|
||||
|
||||
//Summon Player spell
|
||||
if (uiSummonPlayerTimer <= diff)
|
||||
{
|
||||
|
||||
@@ -56,12 +56,12 @@ struct boss_moamAI : public ScriptedAI
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
|
||||
uint32 uiTrampleTimer;
|
||||
uint32 uiDrainManaTimer;
|
||||
uint32 uiPhaseTimer;
|
||||
CombatPhase Phase;
|
||||
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
void Reset()
|
||||
@@ -71,7 +71,7 @@ struct boss_moamAI : public ScriptedAI
|
||||
uiPhaseTimer = 90000;
|
||||
Phase = NORMAL;
|
||||
m_creature->SetPower(POWER_MANA,0);
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MOAM_EVENT, NOT_STARTED);
|
||||
}
|
||||
@@ -79,17 +79,17 @@ struct boss_moamAI : public ScriptedAI
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
DoScriptText(EMOTE_AGGRO, m_creature);
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MOAM_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MOAM_EVENT, DONE);
|
||||
}
|
||||
|
||||
|
||||
void DrainMana()
|
||||
{
|
||||
for (uint8 i=0;i<6;++i)
|
||||
@@ -108,7 +108,7 @@ struct boss_moamAI : public ScriptedAI
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
|
||||
//If we are 100%MANA cast Arcane Erruption
|
||||
if (m_creature->GetPower(POWER_MANA) == m_creature->GetMaxPower(POWER_MANA))
|
||||
{
|
||||
@@ -116,23 +116,23 @@ struct boss_moamAI : public ScriptedAI
|
||||
DoScriptText(EMOTE_MANA_FULL, m_creature);
|
||||
m_creature->SetPower(POWER_MANA,0);
|
||||
}
|
||||
|
||||
|
||||
//Trample Spell
|
||||
if (uiTrampleTimer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(), SPELL_TRAMPLE);
|
||||
uiTrampleTimer = urand(3000,7000);
|
||||
} else uiTrampleTimer -= diff;
|
||||
|
||||
|
||||
//Drain Mana
|
||||
if (uiDrainManaTimer <= diff)
|
||||
{
|
||||
DrainMana();
|
||||
uiDrainManaTimer = urand(3000,7000);
|
||||
} else uiDrainManaTimer -= diff;
|
||||
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
|
||||
//After 90secs change phase
|
||||
if (uiPhaseTimer <= diff)
|
||||
{
|
||||
|
||||
@@ -43,21 +43,21 @@ struct boss_ossirianAI : public ScriptedAI
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_OSSIRIAN_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_OSSIRIAN_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
if (pInstance)
|
||||
|
||||
@@ -49,21 +49,21 @@ struct boss_rajaxxAI : public ScriptedAI
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_RAJAXX_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_RAJAXX_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
{
|
||||
if (pInstance)
|
||||
|
||||
@@ -37,7 +37,7 @@ EndScriptData */
|
||||
struct instance_ruins_of_ahn_qiraj : public ScriptedInstance
|
||||
{
|
||||
instance_ruins_of_ahn_qiraj(Map* pMap) : ScriptedInstance(pMap) { Initialize(); }
|
||||
|
||||
|
||||
uint64 uiKurinaxx;
|
||||
uint64 uiRajaxx;
|
||||
uint64 uiMoam;
|
||||
@@ -47,11 +47,11 @@ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance
|
||||
|
||||
uint8 m_auiEncounter[MAX_ENCOUNTER];
|
||||
std::string str_data;
|
||||
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
|
||||
uiKurinaxx = 0;
|
||||
uiRajaxx = 0;
|
||||
uiMoam = 0;
|
||||
@@ -59,7 +59,7 @@ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance
|
||||
uiAyamiss = 0;
|
||||
uiOssirian = 0;
|
||||
}
|
||||
|
||||
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
@@ -67,7 +67,7 @@ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool add)
|
||||
{
|
||||
switch (pCreature->GetEntry())
|
||||
@@ -92,7 +92,7 @@ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
uint32 GetData(uint32 identifier)
|
||||
{
|
||||
switch(identifier)
|
||||
@@ -104,10 +104,10 @@ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance
|
||||
case DATA_AYAMISS_EVENT: return m_auiEncounter[4];
|
||||
case DATA_OSSIRIAN_EVENT: return m_auiEncounter[5];
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void SetData(uint32 identifier, uint32 data)
|
||||
{
|
||||
switch(identifier)
|
||||
@@ -131,11 +131,11 @@ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance
|
||||
m_auiEncounter[5] = data;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (data == DONE)
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
|
||||
uint64 GetData64(uint32 uiIdentifier)
|
||||
{
|
||||
switch(uiIdentifier)
|
||||
@@ -147,10 +147,10 @@ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance
|
||||
case DATA_AYAMISS: return uiAyamiss;
|
||||
case DATA_OSSIRIAN: return uiOssirian;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
std::string GetSaveData()
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
@@ -164,7 +164,7 @@ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return str_data;
|
||||
}
|
||||
|
||||
|
||||
void Load(const char* in)
|
||||
{
|
||||
if (!in)
|
||||
@@ -189,7 +189,7 @@ struct instance_ruins_of_ahn_qiraj : public ScriptedInstance
|
||||
m_auiEncounter[3] = data3;
|
||||
m_auiEncounter[4] = data4;
|
||||
m_auiEncounter[5] = data5;
|
||||
|
||||
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
|
||||
@@ -29,7 +29,7 @@ EndScriptData */
|
||||
*
|
||||
* The first phase is the EYE phase: the Eye of C'Thun is active and C'thun is not active.
|
||||
* During this phase, the "Eye of C'Thun" alternates between 2 sub-phases:
|
||||
* - PHASE_EYE_GREEN_BEAM:
|
||||
* - PHASE_EYE_GREEN_BEAM:
|
||||
* 50 sec phase during which the Eye mainly casts its Green Beam every 3 sec.
|
||||
* - PHASE_EYE_RED_BEAM:
|
||||
* 35 sec phase during which the Eye casts its red beam every sec.
|
||||
@@ -39,7 +39,7 @@ EndScriptData */
|
||||
* This phase starts with the transformation of the Eye into C'Thun (PHASE_CTHUN_TRANSITION).
|
||||
* After the transformation, C'Thun alternates between 2 sub-phases:
|
||||
* - PHASE_CTHUN_STOMACH:
|
||||
* - C'Thun is almost insensible to all damage (99% damage reduction).
|
||||
* - C'Thun is almost insensible to all damage (99% damage reduction).
|
||||
* - It spawns 2 tentacles in its stomach.
|
||||
* - C'Thun swallows players.
|
||||
* - This sub-phase ends when the 2 tentacles are killed. Swallowed players are regurgitate.
|
||||
@@ -50,7 +50,7 @@ EndScriptData */
|
||||
*
|
||||
* This CTHUN phase ends when C'Thun is killed
|
||||
*
|
||||
* Note:
|
||||
* Note:
|
||||
* - the current phase is stored in the instance data to be easily shared between the eye and cthun.
|
||||
*/
|
||||
|
||||
@@ -94,7 +94,7 @@ enum Spells
|
||||
{
|
||||
//***** Main Phase 1 ********
|
||||
//Eye Spells
|
||||
SPELL_FREEZE_ANIM = 16245,
|
||||
SPELL_FREEZE_ANIM = 16245,
|
||||
SPELL_GREEN_BEAM = 26134,
|
||||
SPELL_DARK_GLARE = 26029,
|
||||
SPELL_RED_COLORATION = 22518, //Probably not the right spell but looks similar
|
||||
@@ -331,7 +331,7 @@ struct eye_of_cthunAI : public Scripted_NoMovementAI
|
||||
//Freeze animation
|
||||
DoCast(m_creature, SPELL_FREEZE_ANIM);
|
||||
m_creature->SetOrientation(DarkGlareAngle);
|
||||
m_creature->StopMoving();
|
||||
m_creature->StopMoving();
|
||||
|
||||
//Darkbeam for 35 seconds
|
||||
PhaseTimer = 35000;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
|
||||
#include "ScriptedPch.h"
|
||||
|
||||
#define NPC_GAHZRILLA 7273
|
||||
@@ -42,7 +42,7 @@ struct instance_zulfarrak : public ScriptedInstance
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
InstanceData* GetInstanceData_instance_zulfarrak(Map* pMap)
|
||||
{
|
||||
return new instance_zulfarrak(pMap);
|
||||
|
||||
@@ -28,7 +28,7 @@ enum Spells
|
||||
SPELL_BASH = 57094, // Victim
|
||||
SPELL_ENTANGLING_ROOTS = 57095, // Random Victim 100Y
|
||||
SPELL_MINI = 57055, // Self
|
||||
SPELL_VENOM_BOLT_VOLLEY = 57088, // Random Victim 100Y
|
||||
SPELL_VENOM_BOLT_VOLLEY = 57088, // Random Victim 100Y
|
||||
SPELL_HEALTHY_MUSHROOM_POTENT_FUNGUS = 56648, // Killer 3Y
|
||||
SPELL_POISONOUS_MUSHROOM_POISON_CLOUD = 57061, // Self - Duration 8 Sec
|
||||
SPELL_POISONOUS_MUSHROOM_VISUAL_AREA = 61566, // Self
|
||||
|
||||
@@ -69,7 +69,7 @@ struct boss_elder_nadoxAI : public ScriptedAI
|
||||
uint32 uiSwarmerSpawnTimer;
|
||||
uint32 uiGuardSpawnTimer;
|
||||
uint32 uiEnragueTimer;
|
||||
|
||||
|
||||
bool bGuardSpawned;
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
@@ -180,7 +180,7 @@ CreatureAI* GetAI_boss_elder_nadox(Creature* pCreature)
|
||||
enum AddSpells
|
||||
{
|
||||
SPELL_SPRINT = 56354,
|
||||
SPELL_GUARDIAN_AURA = 56151
|
||||
SPELL_GUARDIAN_AURA = 56151
|
||||
};
|
||||
|
||||
struct mob_ahnkahar_nerubianAI : public ScriptedAI
|
||||
@@ -212,7 +212,7 @@ struct mob_ahnkahar_nerubianAI : public ScriptedAI
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
|
||||
if (m_creature->GetEntry() == MOB_AHNKAHAR_GUARDIAN_ENTRY)
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_GUARDIAN_AURA);
|
||||
|
||||
|
||||
@@ -518,7 +518,7 @@ struct npc_jedogas_aufseher_triggerAI : public Scripted_NoMovementAI
|
||||
return;
|
||||
|
||||
if (!bRemoved && m_creature->GetPositionX() > 440.0f)
|
||||
{
|
||||
{
|
||||
if (pInstance->GetData(DATA_PRINCE_TALDARAM_EVENT) == DONE)
|
||||
{
|
||||
m_creature->InterruptNonMeleeSpells(true);
|
||||
|
||||
@@ -226,7 +226,7 @@ struct boss_taldaramAI : public ScriptedAI
|
||||
uiPhaseTimer = 500;
|
||||
if (Unit* pEmbraceTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
uiEmbraceTarget = pEmbraceTarget->GetGUID();
|
||||
|
||||
|
||||
}
|
||||
uiVanishTimer = urand(25*IN_MILISECONDS,35*IN_MILISECONDS);
|
||||
} else uiVanishTimer -= diff;
|
||||
|
||||
@@ -58,14 +58,14 @@ struct instance_ahnkahet : public ScriptedInstance
|
||||
uint8 InitiandCnt,
|
||||
switchtrigger,
|
||||
initiandkilled;
|
||||
|
||||
|
||||
std::string str_data;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
InitiandGUIDs.clear();
|
||||
|
||||
|
||||
Elder_Nadox =0;
|
||||
Prince_Taldaram =0;
|
||||
Jedoga_Shadowseeker =0;
|
||||
@@ -256,7 +256,7 @@ struct instance_ahnkahet : public ScriptedInstance
|
||||
<< spheres[0] << " " << spheres[1];
|
||||
|
||||
str_data = saveStream.str();
|
||||
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return str_data;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ struct boss_anub_arakAI : public ScriptedAI
|
||||
m_creature->RemoveAura(SPELL_SUBMERGE);
|
||||
|
||||
lSummons.DespawnAll();
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ANUBARAK_EVENT, NOT_STARTED);
|
||||
}
|
||||
@@ -112,7 +112,7 @@ struct boss_anub_arakAI : public ScriptedAI
|
||||
void EnterCombat(Unit *pWho)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ANUBARAK_EVENT, IN_PROGRESS);
|
||||
}
|
||||
@@ -245,11 +245,11 @@ struct boss_anub_arakAI : public ScriptedAI
|
||||
if (uiPhase != 1)
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
|
||||
void JustDied(Unit *pKiller)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ANUBARAK_EVENT, DONE);
|
||||
}
|
||||
@@ -258,7 +258,7 @@ struct boss_anub_arakAI : public ScriptedAI
|
||||
{
|
||||
if (pVictim == m_creature)
|
||||
return;
|
||||
|
||||
|
||||
DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2,SAY_SLAY_3), m_creature);
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ struct boss_anub_arakAI : public ScriptedAI
|
||||
{
|
||||
lSummons.Summon(summon);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_anub_arak(Creature *pCreature)
|
||||
|
||||
@@ -2040,7 +2040,7 @@ struct npc_trapped_mammoth_calfAI : public ScriptedAI
|
||||
void Reset()
|
||||
{
|
||||
GameObject *pTrap;
|
||||
|
||||
|
||||
uiTimer = 1500;
|
||||
bStarted = false;
|
||||
|
||||
@@ -2089,7 +2089,7 @@ struct npc_trapped_mammoth_calfAI : public ScriptedAI
|
||||
if (param == 1)
|
||||
bStarted = true;
|
||||
}
|
||||
|
||||
|
||||
void MovementInform(uint32 uiType, uint32 uiId)
|
||||
{
|
||||
GameObject* pTrap;
|
||||
@@ -2184,7 +2184,7 @@ struct npc_seaforium_depth_chargeAI : public ScriptedAI
|
||||
{
|
||||
if (uiExplosionTimer < diff)
|
||||
{
|
||||
DoCast(SPELL_SEAFORIUM_DEPTH_CHARGE_EXPLOSION);
|
||||
DoCast(SPELL_SEAFORIUM_DEPTH_CHARGE_EXPLOSION);
|
||||
for(uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
if(Creature* cCredit = m_creature->FindNearestCreature(25402 + i, 10.0f))//25402-25405 credit markers
|
||||
@@ -2194,7 +2194,7 @@ struct npc_seaforium_depth_chargeAI : public ScriptedAI
|
||||
Player* pOwner = uOwner->ToPlayer();
|
||||
if(pOwner && pOwner->GetQuestStatus(QUEST_BURY_THOSE_COCKROACHES) == QUEST_STATUS_INCOMPLETE)
|
||||
pOwner->KilledMonsterCredit(cCredit->GetEntry(),cCredit->GetGUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
m_creature->Kill(m_creature);
|
||||
@@ -2225,7 +2225,7 @@ struct npc_valiance_keep_cannoneerAI : public ScriptedAI
|
||||
uint32 uiTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
{
|
||||
uiTimer = urand(13000,18000);
|
||||
}
|
||||
|
||||
@@ -2261,7 +2261,7 @@ enum Spells
|
||||
SPELL_TRANSITUS_SHIELD_BEAM = 48310
|
||||
};
|
||||
|
||||
enum NPCs
|
||||
enum NPCs
|
||||
{
|
||||
NPC_TRANSITUS_SHIELD_DUMMY = 27306,
|
||||
NPC_WARMAGE_HOLLISTER = 27906,
|
||||
@@ -2336,7 +2336,7 @@ struct npc_warmage_coldarraAI : public Scripted_NoMovementAI
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else m_uiTimer -= uiDiff;
|
||||
|
||||
ScriptedAI::UpdateAI(uiDiff);
|
||||
@@ -2506,7 +2506,7 @@ void AddSC_borean_tundra()
|
||||
newscript->Name = "npc_valiance_keep_cannoneer";
|
||||
newscript->GetAI = &GetAI_npc_valiance_keep_cannoneer;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_warmage_coldarra";
|
||||
newscript->GetAI = &GetAI_npc_warmage_coldarra;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
SDName: CrystalSongForest
|
||||
SDAuthor: Malcrom
|
||||
SD%Complete: 99%
|
||||
SDComment:
|
||||
SDComment:
|
||||
SDCategory: CrystalsongForest
|
||||
Script Data End */
|
||||
|
||||
@@ -35,7 +35,7 @@ enum Spells
|
||||
SPELL_TRANSITUS_SHIELD_BEAM = 48310
|
||||
};
|
||||
|
||||
enum NPCs
|
||||
enum NPCs
|
||||
{
|
||||
NPC_TRANSITUS_SHIELD_DUMMY = 27306,
|
||||
NPC_WARMAGE_SARINA = 32369,
|
||||
@@ -62,7 +62,7 @@ struct npc_warmage_violetstandAI : public Scripted_NoMovementAI
|
||||
{
|
||||
if (m_uiTimer <= uiDiff)
|
||||
{
|
||||
m_creature->CastStop();
|
||||
m_creature->CastStop();
|
||||
Creature* pTarget = GetClosestCreatureWithEntry(me,NPC_TRANSITUS_SHIELD_DUMMY,32.0f);
|
||||
|
||||
switch(me->GetEntry())
|
||||
@@ -90,7 +90,7 @@ struct npc_warmage_violetstandAI : public Scripted_NoMovementAI
|
||||
m_uiTimer = 90000;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else m_uiTimer -= uiDiff;
|
||||
|
||||
ScriptedAI::UpdateAI(uiDiff);
|
||||
|
||||
@@ -111,7 +111,7 @@ CreatureAI* GetAI_npc_mageguard_dalaran(Creature* pCreature)
|
||||
|
||||
enum eHiraSnowdawn
|
||||
{
|
||||
SPELL_COLD_WEATHER_FLYING = 54197
|
||||
SPELL_COLD_WEATHER_FLYING = 54197
|
||||
};
|
||||
|
||||
#define GOSSIP_TEXT_TRAIN_HIRA "I seek training to ride a steed."
|
||||
@@ -138,7 +138,7 @@ bool GossipSelect_npc_hira_snowdawn(Player* pPlayer, Creature* pCreature, uint32
|
||||
|
||||
if (uiAction == GOSSIP_ACTION_TRADE)
|
||||
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ struct boss_dredAI : public ScriptedAI
|
||||
DoCastVictim(SPELL_MANGLING_SLASH,false);
|
||||
uiManglingSlashTimer = 20*IN_MILISECONDS;
|
||||
} else uiManglingSlashTimer -=diff;
|
||||
|
||||
|
||||
if (uiFearsomeRoarTimer < diff)
|
||||
{
|
||||
DoCastAOE(DUNGEON_MODE(SPELL_FEARSOME_ROAR, H_SPELL_FEARSOME_ROAR),false);
|
||||
|
||||
@@ -79,7 +79,7 @@ struct boss_tharon_jaAI : public ScriptedAI
|
||||
uint32 uiEyeBeamTimer;
|
||||
uint32 uiLightningBreathTimer;
|
||||
uint32 uiPoisonCloudTimer;
|
||||
|
||||
|
||||
CombatPhase Phase;
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
@@ -95,7 +95,7 @@ struct boss_tharon_jaAI : public ScriptedAI
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_THARON_JA_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
@@ -103,7 +103,7 @@ struct boss_tharon_jaAI : public ScriptedAI
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_THARON_JA_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
@@ -119,19 +119,19 @@ struct boss_tharon_jaAI : public ScriptedAI
|
||||
DoCast(pTarget, DUNGEON_MODE(SPELL_CURSE_OF_LIFE, H_SPELL_CURSE_OF_LIFE));
|
||||
uiCurseOfLifeTimer = urand(10*IN_MILISECONDS,15*IN_MILISECONDS);
|
||||
} else uiCurseOfLifeTimer -= diff;
|
||||
|
||||
|
||||
if (uiShadowVolleyTimer < diff)
|
||||
{
|
||||
DoCastVictim(DUNGEON_MODE(SPELL_SHADOW_VOLLEY,H_SPELL_SHADOW_VOLLEY));
|
||||
uiShadowVolleyTimer = urand(8*IN_MILISECONDS,10*IN_MILISECONDS);
|
||||
} else uiShadowVolleyTimer -= diff;
|
||||
|
||||
|
||||
if (uiRainOfFireTimer < diff)
|
||||
{
|
||||
DoCastAOE(DUNGEON_MODE(SPELL_RAIN_OF_FIRE,H_SPELL_RAIN_OF_FIRE));
|
||||
uiRainOfFireTimer = urand(14*IN_MILISECONDS,18*IN_MILISECONDS);
|
||||
} else uiRainOfFireTimer -= diff;
|
||||
|
||||
|
||||
if (uiPhaseTimer < diff)
|
||||
{
|
||||
DoCast(SPELL_DECAY_FLESH);
|
||||
@@ -183,7 +183,7 @@ struct boss_tharon_jaAI : public ScriptedAI
|
||||
DoCastAOE(DUNGEON_MODE(SPELL_POISON_CLOUD, H_SPELL_POISON_CLOUD));
|
||||
uiPoisonCloudTimer = urand(10*IN_MILISECONDS,12*IN_MILISECONDS);
|
||||
} else uiPoisonCloudTimer -= diff;
|
||||
|
||||
|
||||
if (uiPhaseTimer < diff)
|
||||
{
|
||||
DoCast(SPELL_RETURN_FLESH);
|
||||
|
||||
@@ -89,7 +89,7 @@ struct boss_trollgoreAI : public ScriptedAI
|
||||
lSummons.DespawnAll();
|
||||
|
||||
m_creature->RemoveAura(DUNGEON_MODE(SPELL_CONSUME_AURA,H_SPELL_CONSUME_AURA));
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_TROLLGORE_EVENT, NOT_STARTED);
|
||||
}
|
||||
@@ -151,7 +151,7 @@ struct boss_trollgoreAI : public ScriptedAI
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
@@ -165,7 +165,7 @@ struct boss_trollgoreAI : public ScriptedAI
|
||||
pInstance->SetData(DATA_TROLLGORE_EVENT, DONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
if (victim == m_creature)
|
||||
|
||||
@@ -45,29 +45,29 @@ struct boss_bronjahmAI : public ScriptedAI
|
||||
{
|
||||
pInstance = m_creature->GetInstanceData();
|
||||
}
|
||||
|
||||
|
||||
uint32 uiFearTimer;
|
||||
uint32 uiShadowBoltTimer;
|
||||
uint32 uiMagicsBaneTimer;
|
||||
uint32 uiCorruptSoulTimer;
|
||||
|
||||
|
||||
CombatPhases Phase;
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Phase = PHASE_1;
|
||||
|
||||
|
||||
uiFearTimer = urand(8000,12000);
|
||||
uiShadowBoltTimer = 2000;
|
||||
uiMagicsBaneTimer = urand(8000,15000);
|
||||
uiCorruptSoulTimer = urand(15000,25000);
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_BRONJAHM_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
//DoScriptText(SAY_AGGRO, m_creature);
|
||||
@@ -75,7 +75,7 @@ struct boss_bronjahmAI : public ScriptedAI
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_BRONJAHM_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
//DoScriptText(SAY_DEATH, m_creature);
|
||||
@@ -83,13 +83,13 @@ struct boss_bronjahmAI : public ScriptedAI
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_BRONJAHM_EVENT, DONE);
|
||||
}
|
||||
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
|
||||
switch (Phase)
|
||||
{
|
||||
case PHASE_1:
|
||||
@@ -111,23 +111,23 @@ struct boss_bronjahmAI : public ScriptedAI
|
||||
} else uiFearTimer -= diff;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (HealthBelowPct(30))
|
||||
DoCast(m_creature,SPELL_TELEPORT);
|
||||
|
||||
|
||||
if (uiShadowBoltTimer <= diff)
|
||||
{
|
||||
if (m_creature->IsWithinMeleeRange(m_creature->getVictim()))
|
||||
DoCastVictim(SPELL_SHADOW_BOLT);
|
||||
uiShadowBoltTimer = 2000;
|
||||
} else uiShadowBoltTimer -= diff;
|
||||
|
||||
|
||||
if (uiMagicsBaneTimer <= diff)
|
||||
{
|
||||
DoCastVictim(DUNGEON_MODE(SPELL_MAGIC_S_BANE,SPELL_MAGIC_S_BANE_H));
|
||||
uiMagicsBaneTimer = urand(8000,15000);
|
||||
} else uiMagicsBaneTimer -= diff;
|
||||
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
@@ -143,9 +143,9 @@ struct mob_corrupted_soul_fragmentAI : public ScriptedAI
|
||||
{
|
||||
pInstance = m_creature->GetInstanceData();
|
||||
}
|
||||
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
@@ -154,7 +154,7 @@ struct mob_corrupted_soul_fragmentAI : public ScriptedAI
|
||||
m_creature->GetMotionMaster()->MoveChase(pBronjham);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
if (pInstance)
|
||||
@@ -173,7 +173,7 @@ CreatureAI* GetAI_mob_corrupted_soul_fragment(Creature* pCreature)
|
||||
void AddSC_boss_bronjahm()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_corruptel_soul_fragment";
|
||||
newscript->GetAI = &GetAI_mob_corrupted_soul_fragment;
|
||||
|
||||
@@ -37,7 +37,7 @@ struct instance_forge_of_souls : public ScriptedInstance
|
||||
{
|
||||
uiBronjahm = 0;
|
||||
uiDevourer = 0;
|
||||
|
||||
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
}
|
||||
|
||||
+3
-3
@@ -40,7 +40,7 @@ struct instance_halls_of_reflection : public ScriptedInstance
|
||||
uiFalric = 0;
|
||||
uiMarwyn = 0;
|
||||
uiLichKing = 0;
|
||||
|
||||
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
}
|
||||
@@ -57,7 +57,7 @@ struct instance_halls_of_reflection : public ScriptedInstance
|
||||
break;
|
||||
case CREATURE_LICHKING:
|
||||
uiLichKing = pCreature->GetGUID();
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/*
|
||||
@@ -80,7 +80,7 @@ struct instance_halls_of_reflection : public ScriptedInstance
|
||||
break;
|
||||
case DATA_LICHKING_EVENT:
|
||||
m_auiEncounter[2] = data;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
if (data == DONE)
|
||||
|
||||
@@ -71,7 +71,7 @@ struct boss_garfrostAI : public ScriptedAI
|
||||
bool phase2;
|
||||
bool phase3;
|
||||
bool bAchievement;
|
||||
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
EventMap events;
|
||||
|
||||
@@ -82,7 +82,7 @@ struct boss_garfrostAI : public ScriptedAI
|
||||
phase2 = false;
|
||||
phase3 = false;
|
||||
bAchievement = true;
|
||||
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_GARFROST_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
@@ -175,8 +175,8 @@ struct boss_ickAI : public ScriptedAI
|
||||
if (pKrick->AI())
|
||||
pKrick->AI()->DoAction(ACTION_OUTRO);
|
||||
}
|
||||
|
||||
if (pInstance)
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_KRICKANDICK_EVENT, DONE);
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ struct boss_ickAI : public ScriptedAI
|
||||
DoScriptText(SAY_ICK_CHASE_1, m_creature, pTarget);
|
||||
DoCast(pTarget, SPELL_PURSUED);
|
||||
}
|
||||
|
||||
|
||||
DoCast(SPELL_CONFUSION);
|
||||
events.ScheduleEvent(EVENT_PURSUE, 30000, GCD_1);
|
||||
return;
|
||||
@@ -274,7 +274,7 @@ struct boss_krickAI : public ScriptedAI
|
||||
KrickPhase phase;
|
||||
uint64 uiNpcOutroDialog;
|
||||
uint64 uiTyrannus;
|
||||
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiNpcOutroDialog = 0;
|
||||
@@ -307,7 +307,7 @@ struct boss_krickAI : public ScriptedAI
|
||||
|
||||
void DoAction(const int32 actionId)
|
||||
{
|
||||
switch(actionId)
|
||||
switch(actionId)
|
||||
{
|
||||
case ACTION_OUTRO:
|
||||
{
|
||||
@@ -324,7 +324,7 @@ struct boss_krickAI : public ScriptedAI
|
||||
if (pJainaOrSylvanas) {
|
||||
Position pos;
|
||||
m_creature->GetNearPosition(pos, 5.0f, 0);
|
||||
pJainaOrSylvanas->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(),
|
||||
pJainaOrSylvanas->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(),
|
||||
pos.GetAngle(m_creature->GetPositionX(), m_creature->GetPositionY()));
|
||||
}
|
||||
else {
|
||||
@@ -333,7 +333,7 @@ struct boss_krickAI : public ScriptedAI
|
||||
else
|
||||
pJainaOrSylvanas = m_creature->SummonCreature(NPC_JAINA_PART1, *m_creature, TEMPSUMMON_MANUAL_DESPAWN);
|
||||
}
|
||||
|
||||
|
||||
if (pJainaOrSylvanas)
|
||||
{
|
||||
pJainaOrSylvanas->SetOrientation(pJainaOrSylvanas->GetAngle(m_creature->GetPositionX(), m_creature->GetPositionY()));
|
||||
@@ -406,14 +406,14 @@ struct boss_krickAI : public ScriptedAI
|
||||
uiTyrannus = (pInstance ? pInstance->GetData64(DATA_TYRANNUS) : 0);
|
||||
events.ScheduleEvent(EVENT_OUTRO_7, 1);
|
||||
break;
|
||||
case EVENT_OUTRO_7:
|
||||
case EVENT_OUTRO_7:
|
||||
if (Creature *pTyrannus = m_creature->GetCreature(*m_creature, uiTyrannus))
|
||||
DoScriptText(SAY_TYRANNUS_OUTRO_7, pTyrannus);
|
||||
events.ScheduleEvent(EVENT_OUTRO_8, 7000);
|
||||
break;
|
||||
case EVENT_OUTRO_8:
|
||||
DoScriptText(SAY_KRICK_OUTRO_8, m_creature);
|
||||
// TODO: Tyrannus starts killing Krick.
|
||||
// TODO: Tyrannus starts killing Krick.
|
||||
// there shall be some visual spell effect
|
||||
events.ScheduleEvent(EVENT_OUTRO_9, 6000);
|
||||
break;
|
||||
@@ -427,7 +427,7 @@ struct boss_krickAI : public ScriptedAI
|
||||
|
||||
events.ScheduleEvent(EVENT_OUTRO_10, 12000);
|
||||
break;
|
||||
case EVENT_OUTRO_10:
|
||||
case EVENT_OUTRO_10:
|
||||
{
|
||||
Creature* pNpcDialog = m_creature->GetCreature(*m_creature, uiNpcOutroDialog);
|
||||
if (pNpcDialog)
|
||||
@@ -447,7 +447,7 @@ struct boss_krickAI : public ScriptedAI
|
||||
Creature* pNpcDialog = m_creature->GetCreature(*m_creature, uiNpcOutroDialog);
|
||||
if (pNpcDialog)
|
||||
pNpcDialog->DisappearAndDie();
|
||||
|
||||
|
||||
m_creature->DisappearAndDie();
|
||||
break;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user