*Cleanup, proper indentation, and remove some wrong/irrelevant comments copied from custom patches..
--HG-- branch : trunk
This commit is contained in:
@@ -784,7 +784,6 @@ void BattleGround::EndBattleGround(uint32 winner)
|
|||||||
else if(winner)
|
else if(winner)
|
||||||
RewardMark(plr,ITEM_LOSER_COUNT);
|
RewardMark(plr,ITEM_LOSER_COUNT);
|
||||||
|
|
||||||
|
|
||||||
plr->SetHealth(plr->GetMaxHealth());
|
plr->SetHealth(plr->GetMaxHealth());
|
||||||
plr->SetPower(POWER_MANA, plr->GetMaxPower(POWER_MANA));
|
plr->SetPower(POWER_MANA, plr->GetMaxPower(POWER_MANA));
|
||||||
plr->CombatStopWithPets(true);
|
plr->CombatStopWithPets(true);
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ void WorldSession::HandleBattlefieldListOpcode( WorldPacket &recv_data )
|
|||||||
|
|
||||||
uint8 fromWhere;
|
uint8 fromWhere;
|
||||||
recv_data >> fromWhere; // 0 - battlemaster (lua: ShowBattlefieldList), 1 - UI (lua: RequestBattlegroundInstanceInfo)
|
recv_data >> fromWhere; // 0 - battlemaster (lua: ShowBattlefieldList), 1 - UI (lua: RequestBattlegroundInstanceInfo)
|
||||||
|
|
||||||
uint8 unk1;
|
uint8 unk1;
|
||||||
recv_data >> unk1; // Unknown 3.2.2
|
recv_data >> unk1; // Unknown 3.2.2
|
||||||
|
|
||||||
@@ -641,7 +641,7 @@ void WorldSession::HandleAreaSpiritHealerQueueOpcode( WorldPacket & recv_data )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data )
|
void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data )
|
||||||
|
|||||||
@@ -2158,21 +2158,21 @@ bool BattleGroundMgr::IsBGWeekend(BattleGroundTypeId bgTypeId)
|
|||||||
|
|
||||||
void BattleGroundMgr::DoCompleteAchievement(uint32 achievement, Player * player)
|
void BattleGroundMgr::DoCompleteAchievement(uint32 achievement, Player * player)
|
||||||
{
|
{
|
||||||
AchievementEntry const* AE = GetAchievementStore()->LookupEntry(achievement);
|
AchievementEntry const* AE = GetAchievementStore()->LookupEntry(achievement);
|
||||||
|
|
||||||
if(!player)
|
if(!player)
|
||||||
{
|
{
|
||||||
//Map::PlayerList const &PlayerList = this->GetPlayers();
|
//Map::PlayerList const &PlayerList = this->GetPlayers();
|
||||||
//GroupsQueueType::iterator group = SelectedGroups.begin();
|
//GroupsQueueType::iterator group = SelectedGroups.begin();
|
||||||
|
|
||||||
//if (!PlayerList.isEmpty())
|
//if (!PlayerList.isEmpty())
|
||||||
//for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
//for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||||
// for (GroupsQueueType::iterator itr = group; itr != SelectedGroups.end(); ++itr)
|
// for (GroupsQueueType::iterator itr = group; itr != SelectedGroups.end(); ++itr)
|
||||||
// if (Player *pPlayer = itr->getSource())
|
// if (Player *pPlayer = itr->getSource())
|
||||||
// pPlayer->CompletedAchievement(AE);
|
// pPlayer->CompletedAchievement(AE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player->CompletedAchievement(AE);
|
player->CompletedAchievement(AE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ class BattleGroundMgr
|
|||||||
static uint8 BGArenaType(BattleGroundQueueTypeId bgQueueTypeId);
|
static uint8 BGArenaType(BattleGroundQueueTypeId bgQueueTypeId);
|
||||||
|
|
||||||
static bool IsBGWeekend(BattleGroundTypeId bgTypeId);
|
static bool IsBGWeekend(BattleGroundTypeId bgTypeId);
|
||||||
void DoCompleteAchievement(uint32 achievement, Player * player = NULL);
|
void DoCompleteAchievement(uint32 achievement, Player * player = NULL);
|
||||||
private:
|
private:
|
||||||
BattleMastersMap mBattleMastersMap;
|
BattleMastersMap mBattleMastersMap;
|
||||||
|
|
||||||
|
|||||||
+13
-14
@@ -67,32 +67,31 @@ BattleGroundWS::~BattleGroundWS()
|
|||||||
void BattleGroundWS::Update(uint32 diff)
|
void BattleGroundWS::Update(uint32 diff)
|
||||||
{
|
{
|
||||||
BattleGround::Update(diff);
|
BattleGround::Update(diff);
|
||||||
|
|
||||||
if (GetStatus() == STATUS_IN_PROGRESS)
|
if (GetStatus() == STATUS_IN_PROGRESS)
|
||||||
{
|
{
|
||||||
if( GetStartTime() >= 25*MINUTE*1000 ) // Òàéìåð òèêàòü íà÷èíàåò ïîñëå 25 ìèíóò
|
if (GetStartTime() >= 25*MINUTE*IN_MILISECONDS) // Òàéìåð òèêàòü íà÷èíàåò ïîñëå 25 ìèíóò
|
||||||
{
|
{
|
||||||
if( GetTeamScore(ALLIANCE) == 0 )
|
if (GetTeamScore(ALLIANCE) == 0)
|
||||||
{
|
{
|
||||||
if ( GetTeamScore(HORDE) == 0 ) // No one scored - result is tie
|
if (GetTeamScore(HORDE) == 0) // No one scored - result is tie
|
||||||
EndBattleGround(NULL);
|
EndBattleGround(NULL);
|
||||||
|
|
||||||
else // Horde has more points and thus wins
|
else // Horde has more points and thus wins
|
||||||
EndBattleGround(HORDE);
|
EndBattleGround(HORDE);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if( GetTeamScore(HORDE) == 0 )
|
else if (GetTeamScore(HORDE) == 0)
|
||||||
EndBattleGround(ALLIANCE); // Alliance has >0, Horde has 0, alliance wins
|
EndBattleGround(ALLIANCE); // Alliance has > 0, Horde has 0, alliance wins
|
||||||
|
|
||||||
else if( GetTeamScore(HORDE) == GetTeamScore(ALLIANCE) ) // Team score equal, winner is team that scored the first flag
|
else if (GetTeamScore(HORDE) == GetTeamScore(ALLIANCE)) // Team score equal, winner is team that scored the first flag
|
||||||
EndBattleGround(m_FirstFlagCaptureTeam);
|
EndBattleGround(m_FirstFlagCaptureTeam);
|
||||||
|
|
||||||
else if( GetTeamScore(HORDE) > GetTeamScore(ALLIANCE) ) // Last but not least, check who has the higher score
|
else if (GetTeamScore(HORDE) > GetTeamScore(ALLIANCE)) // Last but not least, check who has the higher score
|
||||||
EndBattleGround(HORDE);
|
EndBattleGround(HORDE);
|
||||||
else
|
else
|
||||||
EndBattleGround(ALLIANCE);
|
EndBattleGround(ALLIANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_FlagState[BG_TEAM_ALLIANCE] == BG_WS_FLAG_STATE_WAIT_RESPAWN)
|
if (m_FlagState[BG_TEAM_ALLIANCE] == BG_WS_FLAG_STATE_WAIT_RESPAWN)
|
||||||
{
|
{
|
||||||
m_FlagsTimer[BG_TEAM_ALLIANCE] -= diff;
|
m_FlagsTimer[BG_TEAM_ALLIANCE] -= diff;
|
||||||
@@ -317,7 +316,7 @@ void BattleGroundWS::EventPlayerCapturedFlag(Player *Source)
|
|||||||
UpdateTeamScore(Source->GetTeam());
|
UpdateTeamScore(Source->GetTeam());
|
||||||
// only flag capture should be updated
|
// only flag capture should be updated
|
||||||
UpdatePlayerScore(Source, SCORE_FLAG_CAPTURES, 1); // +1 flag captures
|
UpdatePlayerScore(Source, SCORE_FLAG_CAPTURES, 1); // +1 flag captures
|
||||||
|
|
||||||
if(!m_FirstFlagCaptureTeam)
|
if(!m_FirstFlagCaptureTeam)
|
||||||
SetFirstFlagCapture(Source->GetTeam());
|
SetFirstFlagCapture(Source->GetTeam());
|
||||||
|
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ class BattleGroundWS : public BattleGround
|
|||||||
int32 m_FlagsTimer[2];
|
int32 m_FlagsTimer[2];
|
||||||
int32 m_FlagsDropTimer[2];
|
int32 m_FlagsDropTimer[2];
|
||||||
uint32 m_FirstFlagCaptureTeam; // Winner is based on this if score is equal
|
uint32 m_FirstFlagCaptureTeam; // Winner is based on this if score is equal
|
||||||
|
|
||||||
uint32 m_ReputationCapture;
|
uint32 m_ReputationCapture;
|
||||||
uint32 m_HonorWinKills;
|
uint32 m_HonorWinKills;
|
||||||
uint32 m_HonorEndKills;
|
uint32 m_HonorEndKills;
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ bool AOEAI::CanAIAttack(const Unit *who) const
|
|||||||
|
|
||||||
void AOEAI::AttackStart(Unit *who)
|
void AOEAI::AttackStart(Unit *who)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AOEAI::UpdateAI(const uint32 diff)
|
void AOEAI::UpdateAI(const uint32 diff)
|
||||||
|
|||||||
@@ -334,7 +334,7 @@ void LoadDBCStores(const std::string& dataPath)
|
|||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSkillLineStore, dbcPath,"SkillLine.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSkillLineStore, dbcPath,"SkillLine.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSkillLineAbilityStore, dbcPath,"SkillLineAbility.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSkillLineAbilityStore, dbcPath,"SkillLineAbility.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSoundEntriesStore, dbcPath,"SoundEntries.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSoundEntriesStore, dbcPath,"SoundEntries.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellStore, dbcPath,"Spell.dbc", &CustomSpellEntryfmt, &CustomSpellEntryIndex);
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellStore, dbcPath,"Spell.dbc", &CustomSpellEntryfmt, &CustomSpellEntryIndex);
|
||||||
for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
|
for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i)
|
||||||
{
|
{
|
||||||
SpellEntry const * spell = sSpellStore.LookupEntry(i);
|
SpellEntry const * spell = sSpellStore.LookupEntry(i);
|
||||||
|
|||||||
@@ -1214,7 +1214,7 @@ struct ScalingStatValuesEntry
|
|||||||
//uint32 unk1; // 18 all fields equal to 0
|
//uint32 unk1; // 18 all fields equal to 0
|
||||||
//uint32 unk2; // 19 unk, probably also Armor for level
|
//uint32 unk2; // 19 unk, probably also Armor for level
|
||||||
uint32 armorMod2[4]; // 20-23 Armor for level
|
uint32 armorMod2[4]; // 20-23 Armor for level
|
||||||
|
|
||||||
uint32 getssdMultiplier(uint32 mask) const
|
uint32 getssdMultiplier(uint32 mask) const
|
||||||
{
|
{
|
||||||
if (mask & 0x001F)
|
if (mask & 0x001F)
|
||||||
|
|||||||
+2
-2
@@ -104,7 +104,7 @@ bool Group::Create(const uint64 &guid, const char * name)
|
|||||||
m_dungeonDifficulty = leader->GetDungeonDifficulty();
|
m_dungeonDifficulty = leader->GetDungeonDifficulty();
|
||||||
m_raidDifficulty = leader->GetRaidDifficulty();
|
m_raidDifficulty = leader->GetRaidDifficulty();
|
||||||
}
|
}
|
||||||
|
|
||||||
Player::ConvertInstancesToGroup(leader, this, guid);
|
Player::ConvertInstancesToGroup(leader, this, guid);
|
||||||
|
|
||||||
// store group in database
|
// store group in database
|
||||||
@@ -1480,7 +1480,7 @@ void Group::SetDungeonDifficulty(Difficulty difficulty)
|
|||||||
m_dungeonDifficulty = difficulty;
|
m_dungeonDifficulty = difficulty;
|
||||||
if(!isBGGroup())
|
if(!isBGGroup())
|
||||||
CharacterDatabase.PExecute("UPDATE groups SET difficulty = %u WHERE leaderGuid ='%u'", m_dungeonDifficulty, GUID_LOPART(m_leaderGuid));
|
CharacterDatabase.PExecute("UPDATE groups SET difficulty = %u WHERE leaderGuid ='%u'", m_dungeonDifficulty, GUID_LOPART(m_leaderGuid));
|
||||||
|
|
||||||
for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
|
for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
|
||||||
{
|
{
|
||||||
Player *player = itr->getSource();
|
Player *player = itr->getSource();
|
||||||
|
|||||||
+1
-1
@@ -759,7 +759,7 @@ uint32 Item::GetEnchantRequiredLevel() const
|
|||||||
bool Item::IsBoundByEnchant() const
|
bool Item::IsBoundByEnchant() const
|
||||||
{
|
{
|
||||||
// Check all enchants for soulbound
|
// Check all enchants for soulbound
|
||||||
for (uint32 enchant_slot = PERM_ENCHANTMENT_SLOT; enchant_slot < MAX_ENCHANTMENT_SLOT; ++enchant_slot)
|
for (uint32 enchant_slot = PERM_ENCHANTMENT_SLOT; enchant_slot < MAX_ENCHANTMENT_SLOT; ++enchant_slot)
|
||||||
if (uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot)))
|
if (uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot)))
|
||||||
if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id))
|
if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id))
|
||||||
if (enchantEntry->slot & ENCHANTMENT_CAN_SOULBOUND)
|
if (enchantEntry->slot & ENCHANTMENT_CAN_SOULBOUND)
|
||||||
|
|||||||
+2
-2
@@ -319,7 +319,7 @@ class TRINITY_DLL_SPEC Item : public Object
|
|||||||
bool IsWeaponVellum() const { return GetProto()->IsWeaponVellum(); }
|
bool IsWeaponVellum() const { return GetProto()->IsWeaponVellum(); }
|
||||||
bool IsArmorVellum() const { return GetProto()->IsArmorVellum(); }
|
bool IsArmorVellum() const { return GetProto()->IsArmorVellum(); }
|
||||||
bool IsConjuredConsumable() const { return GetProto()->IsConjuredConsumable(); }
|
bool IsConjuredConsumable() const { return GetProto()->IsConjuredConsumable(); }
|
||||||
|
|
||||||
// Item Refund system
|
// Item Refund system
|
||||||
uint32 GetPaidHonorPoints() { return m_paidHonorPoints; }
|
uint32 GetPaidHonorPoints() { return m_paidHonorPoints; }
|
||||||
uint32 GetPaidArenaPoints() { return m_paidArenaPoints; }
|
uint32 GetPaidArenaPoints() { return m_paidArenaPoints; }
|
||||||
@@ -341,7 +341,7 @@ class TRINITY_DLL_SPEC Item : public Object
|
|||||||
ItemUpdateState uState;
|
ItemUpdateState uState;
|
||||||
int16 uQueuePos;
|
int16 uQueuePos;
|
||||||
bool mb_in_trade; // true if item is currently in trade-window
|
bool mb_in_trade; // true if item is currently in trade-window
|
||||||
|
|
||||||
// refund system
|
// refund system
|
||||||
uint32 m_paidHonorPoints;
|
uint32 m_paidHonorPoints;
|
||||||
uint32 m_paidArenaPoints;
|
uint32 m_paidArenaPoints;
|
||||||
|
|||||||
@@ -1393,7 +1393,7 @@ void WorldSession::HandleItemRefund(WorldPacket &recv_data)
|
|||||||
sLog.outDebug("Item refund: item not refundable!");
|
sLog.outDebug("Item refund: item not refundable!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(item->GetRefundExpiryTime() <= time(NULL)) // item refund has expired
|
if(item->GetRefundExpiryTime() <= time(NULL)) // item refund has expired
|
||||||
{
|
{
|
||||||
WorldPacket data(SMSG_ITEM_REFUND);
|
WorldPacket data(SMSG_ITEM_REFUND);
|
||||||
@@ -1401,7 +1401,7 @@ void WorldSession::HandleItemRefund(WorldPacket &recv_data)
|
|||||||
data << uint32(1); // error, abort refund
|
data << uint32(1); // error, abort refund
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
WorldPacket data(SMSG_ITEM_REFUND);
|
WorldPacket data(SMSG_ITEM_REFUND);
|
||||||
data << uint64(guid); // guid?
|
data << uint64(guid); // guid?
|
||||||
data << uint32(0); // must be 0 or client side error in refund
|
data << uint32(0); // must be 0 or client side error in refund
|
||||||
@@ -1414,7 +1414,7 @@ void WorldSession::HandleItemRefund(WorldPacket &recv_data)
|
|||||||
data << uint32(item->GetPaidExtendedCostCount(i));
|
data << uint32(item->GetPaidExtendedCostCount(i));
|
||||||
}
|
}
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
|
|
||||||
// Grant back extendedcost items
|
// Grant back extendedcost items
|
||||||
uint32 count = 0;
|
uint32 count = 0;
|
||||||
uint32 itemid = 0;
|
uint32 itemid = 0;
|
||||||
@@ -1438,11 +1438,11 @@ void WorldSession::HandleItemRefund(WorldPacket &recv_data)
|
|||||||
// Grant back Honor points
|
// Grant back Honor points
|
||||||
if (uint32 honorRefund = item->GetPaidHonorPoints() > 0)
|
if (uint32 honorRefund = item->GetPaidHonorPoints() > 0)
|
||||||
_player->ModifyHonorPoints(honorRefund);
|
_player->ModifyHonorPoints(honorRefund);
|
||||||
|
|
||||||
// Grant back Arena points
|
// Grant back Arena points
|
||||||
if (uint32 arenaRefund = item->GetPaidArenaPoints() > 0)
|
if (uint32 arenaRefund = item->GetPaidArenaPoints() > 0)
|
||||||
_player->ModifyArenaPoints(arenaRefund);
|
_player->ModifyArenaPoints(arenaRefund);
|
||||||
|
|
||||||
// Destroy item
|
// Destroy item
|
||||||
_player->DestroyItemCount(item->GetEntry(), 1, true, true);
|
_player->DestroyItemCount(item->GetEntry(), 1, true, true);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -5410,7 +5410,7 @@ bool ChatHandler::HandleServerShutDownCommand(const char *args)
|
|||||||
char* time_str = strtok ((char*) args, " ");
|
char* time_str = strtok ((char*) args, " ");
|
||||||
char* exitcode_str = strtok (NULL, "");
|
char* exitcode_str = strtok (NULL, "");
|
||||||
|
|
||||||
char* tailStr = *args!='"' ? strtok(NULL, "") : (char*)args;
|
char* tailStr = *args!='"' ? strtok(NULL, "") : (char*)args;
|
||||||
if(!tailStr)
|
if(!tailStr)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -916,7 +916,7 @@ void MailDraft::SendReturnToSender(uint32 sender_acc, uint32 sender_guid, uint32
|
|||||||
void MailDraft::SendMailTo(MailReceiver const& receiver, MailSender const& sender, MailCheckMask checked, uint32 deliver_delay)
|
void MailDraft::SendMailTo(MailReceiver const& receiver, MailSender const& sender, MailCheckMask checked, uint32 deliver_delay)
|
||||||
{
|
{
|
||||||
Player* pReceiver = receiver.GetPlayer(); // can be NULL
|
Player* pReceiver = receiver.GetPlayer(); // can be NULL
|
||||||
|
|
||||||
if (pReceiver)
|
if (pReceiver)
|
||||||
prepareItems(pReceiver); // generate mail template items
|
prepareItems(pReceiver); // generate mail template items
|
||||||
|
|
||||||
|
|||||||
+10
-10
@@ -186,8 +186,8 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
|
|||||||
sLog.outDebug("MAP: Player '%s' must be in a raid group to enter instance of '%s'", player->GetName(), mapName);
|
sLog.outDebug("MAP: Player '%s' must be in a raid group to enter instance of '%s'", player->GetName(), mapName);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Åñëè ÈÊ èëè È×, òî ïðîâåðÿòü óðîâåíü øìîòà îäåòîãî íà ïåðñå.
|
// Åñëè ÈÊ èëè È×, òî ïðîâåðÿòü óðîâåíü øìîòà îäåòîãî íà ïåðñå.
|
||||||
//if(mapid==649)
|
//if (mapid == 649)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -234,7 +234,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
|
|||||||
sLog.outDebug("Map::CanEnter - player '%s' is dead but doesn't have a corpse!", player->GetName());
|
sLog.outDebug("Map::CanEnter - player '%s' is dead but doesn't have a corpse!", player->GetName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
InstanceTemplate const* instance = objmgr.GetInstanceTemplate(mapid);
|
InstanceTemplate const* instance = objmgr.GetInstanceTemplate(mapid);
|
||||||
if(!instance)
|
if(!instance)
|
||||||
return false;
|
return false;
|
||||||
@@ -255,7 +255,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
|
|||||||
//TODO: send some kind of error message to the player
|
//TODO: send some kind of error message to the player
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Encounters in progress
|
//Encounters in progress
|
||||||
if (entry->map_type == MAP_RAID && ((InstanceMap*)boundedMap)->GetInstanceData() && ((InstanceMap*)boundedMap)->GetInstanceData()->IsEncounterInProgress())
|
if (entry->map_type == MAP_RAID && ((InstanceMap*)boundedMap)->GetInstanceData() && ((InstanceMap*)boundedMap)->GetInstanceData()->IsEncounterInProgress())
|
||||||
{
|
{
|
||||||
@@ -263,7 +263,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
|
|||||||
player->SendTransferAborted(mapid, TRANSFER_ABORT_ZONE_IN_COMBAT);
|
player->SendTransferAborted(mapid, TRANSFER_ABORT_ZONE_IN_COMBAT);
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Instance is full
|
//Instance is full
|
||||||
MapDifficulty const* mapDiff = ((InstanceMap*)player)->GetMapDifficulty();
|
MapDifficulty const* mapDiff = ((InstanceMap*)player)->GetMapDifficulty();
|
||||||
int8 maxPlayers = mapDiff ? mapDiff->maxPlayers : 0;
|
int8 maxPlayers = mapDiff ? mapDiff->maxPlayers : 0;
|
||||||
@@ -308,15 +308,15 @@ MapManager::Update(uint32 diff)
|
|||||||
#ifdef MULTI_THREAD_MAP
|
#ifdef MULTI_THREAD_MAP
|
||||||
for(; iter != i_maps.end(); ++iter)
|
for(; iter != i_maps.end(); ++iter)
|
||||||
{
|
{
|
||||||
if (m_updater.activated())
|
if (m_updater.activated())
|
||||||
m_updater.schedule_update(*iter->second, i_timer.GetCurrent());
|
m_updater.schedule_update(*iter->second, i_timer.GetCurrent());
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
iter->second->Update(i_timer.GetCurrent());
|
iter->second->Update(i_timer.GetCurrent());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m_updater.activated())
|
if (m_updater.activated())
|
||||||
m_updater.wait();
|
m_updater.wait();
|
||||||
#else
|
#else
|
||||||
for (; iter != i_maps.end(); ++iter)
|
for (; iter != i_maps.end(); ++iter)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ bool MapUpdater::activated()
|
|||||||
|
|
||||||
void MapUpdater::update_finished()
|
void MapUpdater::update_finished()
|
||||||
{
|
{
|
||||||
ACE_GUARD(ACE_Thread_Mutex, guard, this->m_mutex);
|
ACE_GUARD(ACE_Thread_Mutex, guard, this->m_mutex);
|
||||||
|
|
||||||
if (this->pedning_requests == 0)
|
if (this->pedning_requests == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data)
|
|||||||
{
|
{
|
||||||
uint32 opcode = recv_data.GetOpcode();
|
uint32 opcode = recv_data.GetOpcode();
|
||||||
sLog.outDebug("WORLD: Recvd %s (%u, 0x%X) opcode", LookupOpcodeName(opcode), opcode, opcode);
|
sLog.outDebug("WORLD: Recvd %s (%u, 0x%X) opcode", LookupOpcodeName(opcode), opcode, opcode);
|
||||||
|
|
||||||
/* extract packet */
|
/* extract packet */
|
||||||
uint64 guid;
|
uint64 guid;
|
||||||
uint32 unk1;
|
uint32 unk1;
|
||||||
@@ -526,7 +526,7 @@ void WorldSession::HandleMoveNotActiveMover(WorldPacket &recv_data)
|
|||||||
MovementInfo mi;
|
MovementInfo mi;
|
||||||
mi.guid = old_mover_guid;
|
mi.guid = old_mover_guid;
|
||||||
ReadMovementInfo(recv_data, &mi);
|
ReadMovementInfo(recv_data, &mi);
|
||||||
|
|
||||||
//ReadMovementInfo(recv_data, &_player->m_mover->m_movementInfo);
|
//ReadMovementInfo(recv_data, &_player->m_mover->m_movementInfo);
|
||||||
_player->m_movementInfo = mi;
|
_player->m_movementInfo = mi;
|
||||||
}
|
}
|
||||||
@@ -554,7 +554,7 @@ void WorldSession::HandleDismissControlledVehicle(WorldPacket &recv_data)
|
|||||||
ReadMovementInfo(recv_data, &mi);
|
ReadMovementInfo(recv_data, &mi);
|
||||||
|
|
||||||
_player->m_movementInfo = mi;
|
_player->m_movementInfo = mi;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
ReadMovementInfo(recv_data, &_player->m_mover->m_movementInfo);*/
|
ReadMovementInfo(recv_data, &_player->m_mover->m_movementInfo);*/
|
||||||
_player->ExitVehicle();
|
_player->ExitVehicle();
|
||||||
|
|||||||
+16
-17
@@ -2070,7 +2070,7 @@ void ObjectMgr::LoadItemPrototypes()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req)
|
if (req)
|
||||||
{
|
{
|
||||||
if(!(proto->AllowableClass & CLASSMASK_ALL_PLAYABLE))
|
if(!(proto->AllowableClass & CLASSMASK_ALL_PLAYABLE))
|
||||||
@@ -3338,7 +3338,7 @@ void ObjectMgr::LoadGroups()
|
|||||||
uint32 count = 0;
|
uint32 count = 0;
|
||||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
||||||
QueryResult *result = CharacterDatabase.Query("SELECT mainTank, mainAssistant, lootMethod, looterGuid, lootThreshold, icon1, icon2, icon3, icon4, icon5, icon6, icon7, icon8, isRaid, difficulty, raiddifficulty, leaderGuid FROM groups");
|
QueryResult *result = CharacterDatabase.Query("SELECT mainTank, mainAssistant, lootMethod, looterGuid, lootThreshold, icon1, icon2, icon3, icon4, icon5, icon6, icon7, icon8, isRaid, difficulty, raiddifficulty, leaderGuid FROM groups");
|
||||||
|
|
||||||
if( !result )
|
if( !result )
|
||||||
{
|
{
|
||||||
barGoLink bar( 1 );
|
barGoLink bar( 1 );
|
||||||
@@ -3561,7 +3561,7 @@ void ObjectMgr::LoadQuests()
|
|||||||
|
|
||||||
delete result;
|
delete result;
|
||||||
|
|
||||||
std::map<uint32,uint32> usedMailTemplates;
|
std::map<uint32,uint32> usedMailTemplates;
|
||||||
|
|
||||||
// Post processing
|
// Post processing
|
||||||
for (QuestMap::iterator iter = mQuestTemplates.begin(); iter != mQuestTemplates.end(); ++iter)
|
for (QuestMap::iterator iter = mQuestTemplates.begin(); iter != mQuestTemplates.end(); ++iter)
|
||||||
@@ -4689,36 +4689,36 @@ void ObjectMgr::LoadWaypointScripts()
|
|||||||
void ObjectMgr::LoadItemTexts()
|
void ObjectMgr::LoadItemTexts()
|
||||||
{
|
{
|
||||||
QueryResult *result = CharacterDatabase.Query("SELECT id, text FROM item_text");
|
QueryResult *result = CharacterDatabase.Query("SELECT id, text FROM item_text");
|
||||||
|
|
||||||
uint32 count = 0;
|
uint32 count = 0;
|
||||||
|
|
||||||
if( !result )
|
if( !result )
|
||||||
{
|
{
|
||||||
barGoLink bar( 1 );
|
barGoLink bar( 1 );
|
||||||
bar.step();
|
bar.step();
|
||||||
|
|
||||||
sLog.outString();
|
sLog.outString();
|
||||||
sLog.outString( ">> Loaded %u item pages", count );
|
sLog.outString( ">> Loaded %u item pages", count );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
barGoLink bar( result->GetRowCount() );
|
barGoLink bar( result->GetRowCount() );
|
||||||
|
|
||||||
Field* fields;
|
Field* fields;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
bar.step();
|
bar.step();
|
||||||
|
|
||||||
fields = result->Fetch();
|
fields = result->Fetch();
|
||||||
|
|
||||||
mItemTexts[ fields[0].GetUInt32() ] = fields[1].GetCppString();
|
mItemTexts[ fields[0].GetUInt32() ] = fields[1].GetCppString();
|
||||||
|
|
||||||
++count;
|
++count;
|
||||||
|
|
||||||
} while ( result->NextRow() );
|
} while ( result->NextRow() );
|
||||||
|
|
||||||
delete result;
|
delete result;
|
||||||
|
|
||||||
sLog.outString();
|
sLog.outString();
|
||||||
sLog.outString( ">> Loaded %u item texts", count );
|
sLog.outString( ">> Loaded %u item texts", count );
|
||||||
}
|
}
|
||||||
@@ -5253,7 +5253,6 @@ void ObjectMgr::LoadAreaTriggerScripts()
|
|||||||
sLog.outString( ">> Loaded %u areatrigger scripts", count );
|
sLog.outString( ">> Loaded %u areatrigger scripts", count );
|
||||||
}
|
}
|
||||||
|
|
||||||
// use searched_node for search some known node
|
|
||||||
uint32 ObjectMgr::GetNearestTaxiNode( float x, float y, float z, uint32 mapid, uint32 team )
|
uint32 ObjectMgr::GetNearestTaxiNode( float x, float y, float z, uint32 mapid, uint32 team )
|
||||||
{
|
{
|
||||||
bool found = false;
|
bool found = false;
|
||||||
@@ -5264,7 +5263,7 @@ uint32 ObjectMgr::GetNearestTaxiNode( float x, float y, float z, uint32 mapid, u
|
|||||||
{
|
{
|
||||||
TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(i);
|
TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(i);
|
||||||
|
|
||||||
if(!node || node->map_id != mapid || !node->MountCreatureID[team == ALLIANCE ? 1 : 0] && node->MountCreatureID[0] != 32981) // dk flight
|
if(!node || node->map_id != mapid || !node->MountCreatureID[team == ALLIANCE ? 1 : 0] && node->MountCreatureID[0] != 32981) // dk flight
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
uint8 field = (uint8)((i - 1) / 32);
|
uint8 field = (uint8)((i - 1) / 32);
|
||||||
@@ -5274,7 +5273,7 @@ uint32 ObjectMgr::GetNearestTaxiNode( float x, float y, float z, uint32 mapid, u
|
|||||||
if((sTaxiNodesMask[field] & submask)==0)
|
if((sTaxiNodesMask[field] & submask)==0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
float dist2 = (node->x - x)*(node->x - x)+(node->y - y)*(node->y - y)+(node->z - z)*(node->z - z);
|
float dist2 = (node->x - x)*(node->x - x)+(node->y - y)*(node->y - y)+(node->z - z)*(node->z - z);
|
||||||
if(found)
|
if(found)
|
||||||
{
|
{
|
||||||
if(dist2 < dist)
|
if(dist2 < dist)
|
||||||
|
|||||||
@@ -404,18 +404,18 @@ void WorldSession::HandlePetSetAction( WorldPacket & recv_data )
|
|||||||
uint32 position[2];
|
uint32 position[2];
|
||||||
uint32 data[2];
|
uint32 data[2];
|
||||||
bool move_command = false;
|
bool move_command = false;
|
||||||
|
|
||||||
for(uint8 i = 0; i < count; ++i)
|
for(uint8 i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
recv_data >> position[i];
|
recv_data >> position[i];
|
||||||
recv_data >> data[i];
|
recv_data >> data[i];
|
||||||
|
|
||||||
uint8 act_state = UNIT_ACTION_BUTTON_TYPE(data[i]);
|
uint8 act_state = UNIT_ACTION_BUTTON_TYPE(data[i]);
|
||||||
|
|
||||||
//ignore invalid position
|
//ignore invalid position
|
||||||
if(position[i] >= MAX_UNIT_ACTION_BAR_INDEX)
|
if(position[i] >= MAX_UNIT_ACTION_BAR_INDEX)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// in the normal case, command and reaction buttons can only be moved, not removed
|
// in the normal case, command and reaction buttons can only be moved, not removed
|
||||||
// at moving count ==2, at removing count == 1
|
// at moving count ==2, at removing count == 1
|
||||||
// ignore attempt to remove command|reaction buttons (not possible at normal case)
|
// ignore attempt to remove command|reaction buttons (not possible at normal case)
|
||||||
@@ -423,11 +423,11 @@ void WorldSession::HandlePetSetAction( WorldPacket & recv_data )
|
|||||||
{
|
{
|
||||||
if (count == 1)
|
if (count == 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
move_command = true;
|
move_command = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check swap (at command->spell swap client remove spell first in another packet, so check only command move correctness)
|
// check swap (at command->spell swap client remove spell first in another packet, so check only command move correctness)
|
||||||
if (move_command)
|
if (move_command)
|
||||||
{
|
{
|
||||||
@@ -440,7 +440,7 @@ void WorldSession::HandlePetSetAction( WorldPacket & recv_data )
|
|||||||
act_state_0 != actionEntry_1->GetType())
|
act_state_0 != actionEntry_1->GetType())
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8 act_state_1 = UNIT_ACTION_BUTTON_TYPE(data[1]);
|
uint8 act_state_1 = UNIT_ACTION_BUTTON_TYPE(data[1]);
|
||||||
if(act_state_1 == ACT_COMMAND || act_state_1 == ACT_REACTION)
|
if(act_state_1 == ACT_COMMAND || act_state_1 == ACT_REACTION)
|
||||||
{
|
{
|
||||||
@@ -451,12 +451,12 @@ void WorldSession::HandlePetSetAction( WorldPacket & recv_data )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(uint8 i = 0; i < count; ++i)
|
for(uint8 i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
uint32 spell_id = UNIT_ACTION_BUTTON_ACTION(data[i]);
|
uint32 spell_id = UNIT_ACTION_BUTTON_ACTION(data[i]);
|
||||||
uint8 act_state = UNIT_ACTION_BUTTON_TYPE(data[i]);
|
uint8 act_state = UNIT_ACTION_BUTTON_TYPE(data[i]);
|
||||||
|
|
||||||
sLog.outDetail( "Player %s has changed pet spell action. Position: %u, Spell: %u, State: 0x%X", _player->GetName(), position[i], spell_id, uint32(act_state));
|
sLog.outDetail( "Player %s has changed pet spell action. Position: %u, Spell: %u, State: 0x%X", _player->GetName(), position[i], spell_id, uint32(act_state));
|
||||||
|
|
||||||
//if it's act for spell (en/disable/cast) and there is a spell given (0 = remove spell) which pet doesn't know, don't add
|
//if it's act for spell (en/disable/cast) and there is a spell given (0 = remove spell) which pet doesn't know, don't add
|
||||||
|
|||||||
+8
-8
@@ -8248,12 +8248,12 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
|
|||||||
// 8 Arena season id
|
// 8 Arena season id
|
||||||
data << uint32(0xF3D) << uint32(sWorld.getConfig(CONFIG_ARENA_SEASON_ID));
|
data << uint32(0xF3D) << uint32(sWorld.getConfig(CONFIG_ARENA_SEASON_ID));
|
||||||
|
|
||||||
// May be send timer to start Wintergrasp
|
// May be send timer to start Wintergrasp
|
||||||
//if(sWorld.GetWintergrapsState()==4354)
|
//if(sWorld.GetWintergrapsState()==4354)
|
||||||
// data << uint32(0x1102) << sWorld.GetWintergrapsTimer();
|
// data << uint32(0x1102) << sWorld.GetWintergrapsTimer();
|
||||||
//else
|
//else
|
||||||
// data << uint32(0xEC5) << sWorld.GetWintergrapsTimer();
|
// data << uint32(0xEC5) << sWorld.GetWintergrapsTimer();
|
||||||
// ---
|
// ---
|
||||||
if(mapid == 530) // Outland
|
if(mapid == 530) // Outland
|
||||||
{
|
{
|
||||||
data << uint32(0x9bf) << uint32(0x0); // 7
|
data << uint32(0x9bf) << uint32(0x0); // 7
|
||||||
@@ -18503,7 +18503,7 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
|
|||||||
data << uint32(count);
|
data << uint32(count);
|
||||||
GetSession()->SendPacket(&data);
|
GetSession()->SendPacket(&data);
|
||||||
SendNewItem(it, pProto->BuyCount*count, true, false, false);
|
SendNewItem(it, pProto->BuyCount*count, true, false, false);
|
||||||
|
|
||||||
// Item Refund system, only works for non stackable items with extendedcost
|
// Item Refund system, only works for non stackable items with extendedcost
|
||||||
if(count == 1 && crItem->ExtendedCost )
|
if(count == 1 && crItem->ExtendedCost )
|
||||||
{
|
{
|
||||||
@@ -19443,7 +19443,7 @@ void Player::AddComboPoints(Unit* target, int8 count, Spell * spell)
|
|||||||
// without combo points lost (duration checked in aura)
|
// without combo points lost (duration checked in aura)
|
||||||
RemoveAurasByType(SPELL_AURA_RETAIN_COMBO_POINTS);
|
RemoveAurasByType(SPELL_AURA_RETAIN_COMBO_POINTS);
|
||||||
|
|
||||||
if (target->GetGUID() == m_comboTarget)
|
if (target->GetGUID() == m_comboTarget)
|
||||||
*comboPoints += count;
|
*comboPoints += count;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2488,7 +2488,7 @@ enum DiminishingGroup
|
|||||||
DIMINISHING_TAUNT,
|
DIMINISHING_TAUNT,
|
||||||
DIMINISHING_LIMITONLY // Don't Diminish, but limit duration to 10s
|
DIMINISHING_LIMITONLY // Don't Diminish, but limit duration to 10s
|
||||||
};
|
};
|
||||||
|
|
||||||
enum SummonCategory
|
enum SummonCategory
|
||||||
{
|
{
|
||||||
SUMMON_CATEGORY_WILD = 0,
|
SUMMON_CATEGORY_WILD = 0,
|
||||||
|
|||||||
@@ -955,10 +955,10 @@ void AuraEffect::HandleSchoolAbsorb(bool apply, bool Real, bool changeAmount)
|
|||||||
if (apply)
|
if (apply)
|
||||||
{
|
{
|
||||||
// prevent double apply bonuses
|
// prevent double apply bonuses
|
||||||
if (m_target->GetTypeId()!=TYPEID_PLAYER || !((Player*)m_target)->GetSession()->PlayerLoading())
|
if (m_target->GetTypeId() != TYPEID_PLAYER || !((Player*)m_target)->GetSession()->PlayerLoading())
|
||||||
{
|
{
|
||||||
float DoneActualBenefit = 0.0f;
|
float DoneActualBenefit = 0.0f;
|
||||||
switch(m_spellProto->SpellFamilyName)
|
switch (m_spellProto->SpellFamilyName)
|
||||||
{
|
{
|
||||||
case SPELLFAMILY_PRIEST:
|
case SPELLFAMILY_PRIEST:
|
||||||
// Power Word: Shield
|
// Power Word: Shield
|
||||||
@@ -4763,7 +4763,7 @@ void AuraEffect::HandlePeriodicTriggerSpell(bool apply, bool Real, bool /*change
|
|||||||
{
|
{
|
||||||
case 66: // Invisibility
|
case 66: // Invisibility
|
||||||
m_target->CastSpell(m_target, 32612, true, NULL, this);
|
m_target->CastSpell(m_target, 32612, true, NULL, this);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
case 42783: //Wrath of the Astrom...
|
case 42783: //Wrath of the Astrom...
|
||||||
m_target->CastSpell(m_target, m_spellProto->CalculateSimpleValue(GetEffIndex()+1), true);
|
m_target->CastSpell(m_target, m_spellProto->CalculateSimpleValue(GetEffIndex()+1), true);
|
||||||
@@ -6055,7 +6055,7 @@ void AuraEffect::PeriodicTick()
|
|||||||
bool crit = IsPeriodicTickCrit(pCaster);
|
bool crit = IsPeriodicTickCrit(pCaster);
|
||||||
if (crit)
|
if (crit)
|
||||||
pdamage = pCaster->SpellCriticalDamageBonus(m_spellProto, pdamage, m_target);
|
pdamage = pCaster->SpellCriticalDamageBonus(m_spellProto, pdamage, m_target);
|
||||||
|
|
||||||
// Reduce dot damage from resilience for players.
|
// Reduce dot damage from resilience for players.
|
||||||
if (m_target->GetTypeId() == TYPEID_PLAYER)
|
if (m_target->GetTypeId() == TYPEID_PLAYER)
|
||||||
pdamage-=((Player*)m_target)->GetSpellDamageReduction(pdamage);
|
pdamage-=((Player*)m_target)->GetSpellDamageReduction(pdamage);
|
||||||
@@ -6126,7 +6126,7 @@ void AuraEffect::PeriodicTick()
|
|||||||
cleanDamage.mitigated_damage += pdamage - pdamageReductedArmor;
|
cleanDamage.mitigated_damage += pdamage - pdamageReductedArmor;
|
||||||
pdamage = pdamageReductedArmor;
|
pdamage = pdamageReductedArmor;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reduce dot damage from resilience for players.
|
// Reduce dot damage from resilience for players.
|
||||||
if (m_target->GetTypeId() == TYPEID_PLAYER)
|
if (m_target->GetTypeId() == TYPEID_PLAYER)
|
||||||
pdamage-=((Player*)m_target)->GetSpellDamageReduction(pdamage);
|
pdamage-=((Player*)m_target)->GetSpellDamageReduction(pdamage);
|
||||||
|
|||||||
+26
-26
@@ -865,22 +865,22 @@ void Spell::EffectDummy(uint32 i)
|
|||||||
m_caster->CastSpell(unitTarget,spell_id,true,NULL);
|
m_caster->CastSpell(unitTarget,spell_id,true,NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case 67019: // Flask of the North
|
case 67019: // Flask of the North
|
||||||
{
|
{
|
||||||
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint32 spell_id;
|
uint32 spell_id;
|
||||||
switch(urand(1, 3))
|
switch(urand(1, 3))
|
||||||
{
|
{
|
||||||
case 1: spell_id = 67016; break;
|
case 1: spell_id = 67016; break;
|
||||||
case 2: spell_id = 67017; break;
|
case 2: spell_id = 67017; break;
|
||||||
default:spell_id = 67018; break;
|
default:spell_id = 67018; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_caster->CastSpell(m_caster, spell_id, true, NULL);
|
m_caster->CastSpell(m_caster, spell_id, true, NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case 13280: // Gnomish Death Ray
|
case 13280: // Gnomish Death Ray
|
||||||
{
|
{
|
||||||
if (!unitTarget)
|
if (!unitTarget)
|
||||||
@@ -3367,7 +3367,7 @@ void Spell::EffectOpenLock(uint32 effIndex)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: Add script for spell 41920 - Filling, becouse server it freze when use this spell
|
// TODO: Add script for spell 41920 - Filling, becouse server it freze when use this spell
|
||||||
// handle outdoor pvp object opening, return true if go was registered for handling
|
// handle outdoor pvp object opening, return true if go was registered for handling
|
||||||
// these objects must have been spawned by outdoorpvp!
|
// these objects must have been spawned by outdoorpvp!
|
||||||
else if(gameObjTarget->GetGOInfo()->type == GAMEOBJECT_TYPE_GOOBER && sOutdoorPvPMgr.HandleOpenGo(player, gameObjTarget->GetGUID()))
|
else if(gameObjTarget->GetGOInfo()->type == GAMEOBJECT_TYPE_GOOBER && sOutdoorPvPMgr.HandleOpenGo(player, gameObjTarget->GetGUID()))
|
||||||
@@ -5204,17 +5204,17 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
|||||||
|
|
||||||
switch(((Player*)unitTarget)->GetBaseSkillValue(762))
|
switch(((Player*)unitTarget)->GetBaseSkillValue(762))
|
||||||
{
|
{
|
||||||
case 75: unitTarget->CastSpell(unitTarget, 51621, true); break;;
|
case 75: unitTarget->CastSpell(unitTarget, 51621, true); break;;
|
||||||
case 150: unitTarget->CastSpell(unitTarget, 48024, true); break;
|
case 150: unitTarget->CastSpell(unitTarget, 48024, true); break;
|
||||||
case 225:
|
case 225:
|
||||||
if(((Player*)unitTarget)->GetMapId()==571 || ((Player*)unitTarget)->GetMapId()==530)
|
if(((Player*)unitTarget)->GetMapId()==571 || ((Player*)unitTarget)->GetMapId()==530)
|
||||||
unitTarget->CastSpell(unitTarget, 51617, true);
|
unitTarget->CastSpell(unitTarget, 51617, true);
|
||||||
break;
|
break;
|
||||||
case 300:
|
case 300:
|
||||||
if(((Player*)unitTarget)->GetMapId()==571 || ((Player*)unitTarget)->GetMapId()==530)
|
if(((Player*)unitTarget)->GetMapId()==571 || ((Player*)unitTarget)->GetMapId()==530)
|
||||||
unitTarget->CastSpell(unitTarget, 48023, true);
|
unitTarget->CastSpell(unitTarget, 48023, true);
|
||||||
break;
|
break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
+32
-32
@@ -923,7 +923,7 @@ bool Guardian::UpdateStats(Stats stat)
|
|||||||
|
|
||||||
Unit *owner = GetOwner();
|
Unit *owner = GetOwner();
|
||||||
// Handle Death Knight Glyphs and Talents
|
// Handle Death Knight Glyphs and Talents
|
||||||
float mod = 0.75f;
|
float mod = 0.75f;
|
||||||
if (IsPetGhoul() && (stat == STAT_STAMINA || stat == STAT_STRENGTH))
|
if (IsPetGhoul() && (stat == STAT_STAMINA || stat == STAT_STRENGTH))
|
||||||
{
|
{
|
||||||
switch (stat)
|
switch (stat)
|
||||||
@@ -948,26 +948,26 @@ bool Guardian::UpdateStats(Stats stat)
|
|||||||
else if (stat == STAT_STAMINA)
|
else if (stat == STAT_STAMINA)
|
||||||
{
|
{
|
||||||
if (owner->getClass() == CLASS_WARLOCK && isPet())
|
if (owner->getClass() == CLASS_WARLOCK && isPet())
|
||||||
value += float(owner->GetStat(STAT_STAMINA)) * 0.75f;
|
value += float(owner->GetStat(STAT_STAMINA)) * 0.75f;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mod = 0.3f;
|
mod = 0.3f;
|
||||||
if (((Creature*)this)->isPet())
|
if (((Creature*)this)->isPet())
|
||||||
{
|
{
|
||||||
PetSpellMap::const_iterator itr = (((Pet*)this)->m_spells.find(62758)); //Wild Hunt rank1
|
PetSpellMap::const_iterator itr = (((Pet*)this)->m_spells.find(62758)); // Wild Hunt rank 1
|
||||||
if (itr == ((Pet*)this)->m_spells.end())
|
if (itr == ((Pet*)this)->m_spells.end())
|
||||||
{
|
{
|
||||||
itr = ((Pet*)this)->m_spells.find(62762); //Wild Hunt rank2
|
itr = ((Pet*)this)->m_spells.find(62762); // Wild Hunt rank 2
|
||||||
}
|
}
|
||||||
if (itr != ((Pet*)this)->m_spells.end()) // If pet has Wild Hunt
|
if (itr != ((Pet*)this)->m_spells.end()) // If pet has Wild Hunt
|
||||||
{
|
{
|
||||||
|
|
||||||
SpellEntry const* sProto = sSpellStore.LookupEntry(itr->first); // Then get the SpellProto and add the dummy effect value
|
SpellEntry const* sProto = sSpellStore.LookupEntry(itr->first); // Then get the SpellProto and add the dummy effect value
|
||||||
mod += mod * (sProto->EffectBasePoints[0] / 100.0f);
|
mod += mod * (sProto->EffectBasePoints[0] / 100.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
value += float(owner->GetStat(stat)) * mod;
|
value += float(owner->GetStat(stat)) * mod;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//warlock's and mage's pets gain 30% of owner's intellect
|
//warlock's and mage's pets gain 30% of owner's intellect
|
||||||
else if (stat == STAT_INTELLECT)
|
else if (stat == STAT_INTELLECT)
|
||||||
@@ -1117,21 +1117,21 @@ void Guardian::UpdateAttackPowerAndDamage(bool ranged)
|
|||||||
{
|
{
|
||||||
if(isHunterPet()) //hunter pets benefit from owner's attack power
|
if(isHunterPet()) //hunter pets benefit from owner's attack power
|
||||||
{
|
{
|
||||||
float mod = 1.0f; //Hunter contribution modifier
|
float mod = 1.0f; //Hunter contribution modifier
|
||||||
if (((Creature*)this)->isPet())
|
if (((Creature*)this)->isPet())
|
||||||
{
|
{
|
||||||
PetSpellMap::const_iterator itr = ((Pet*)this)->m_spells.find(62758); //Wild Hunt rank1
|
PetSpellMap::const_iterator itr = ((Pet*)this)->m_spells.find(62758); //Wild Hunt rank 1
|
||||||
if (itr == ((Pet*)this)->m_spells.end())
|
if (itr == ((Pet*)this)->m_spells.end())
|
||||||
{
|
{
|
||||||
itr = ((Pet*)this)->m_spells.find(62762); //Wild Hunt rank2
|
itr = ((Pet*)this)->m_spells.find(62762); //Wild Hunt rank 2
|
||||||
}
|
}
|
||||||
if (itr != ((Pet*)this)->m_spells.end()) // If pet has Wild Hunt
|
if (itr != ((Pet*)this)->m_spells.end()) // If pet has Wild Hunt
|
||||||
{
|
{
|
||||||
|
|
||||||
SpellEntry const* sProto = sSpellStore.LookupEntry(itr->first); // Then get the SpellProto and add the dummy effect value
|
SpellEntry const* sProto = sSpellStore.LookupEntry(itr->first); // Then get the SpellProto and add the dummy effect value
|
||||||
mod += (sProto->EffectBasePoints[1] / 100.0f);
|
mod += (sProto->EffectBasePoints[1] / 100.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bonusAP = owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.22f * mod;
|
bonusAP = owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.22f * mod;
|
||||||
SetBonusDamage( int32(owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.1287f * mod));
|
SetBonusDamage( int32(owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.1287f * mod));
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-17
@@ -5014,17 +5014,17 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
|||||||
triggered_spell_id = 58374;
|
triggered_spell_id = 58374;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Glyph of Devastate
|
// Glyph of Devastate
|
||||||
if (dummySpell->Id == 58388)
|
if (dummySpell->Id == 58388)
|
||||||
{
|
{
|
||||||
if (!pVictim || !pVictim->isAlive())
|
if (!pVictim || !pVictim->isAlive())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (Aura* aur = pVictim->GetAura(58567,0))
|
if (Aura* aur = pVictim->GetAura(58567,0))
|
||||||
aur->modStackAmount(1);
|
aur->modStackAmount(1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// Unstable Power
|
// Unstable Power
|
||||||
case 24658:
|
case 24658:
|
||||||
{
|
{
|
||||||
@@ -5332,12 +5332,12 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
|||||||
// Shadowfiend Death (Gain mana if pet dies with Glyph of Shadowfiend)
|
// Shadowfiend Death (Gain mana if pet dies with Glyph of Shadowfiend)
|
||||||
case 57989:
|
case 57989:
|
||||||
{
|
{
|
||||||
Unit *owner = GetOwner();
|
Unit *owner = GetOwner();
|
||||||
if (!owner || owner->GetTypeId() != TYPEID_PLAYER)
|
if (!owner || owner->GetTypeId() != TYPEID_PLAYER)
|
||||||
return false;
|
return false;
|
||||||
// Glyph of Shadowfiend (need cast as self cast for owner, no hidden cooldown)
|
// Glyph of Shadowfiend (need cast as self cast for owner, no hidden cooldown)
|
||||||
owner->CastSpell(owner,58227,true,castItem,triggeredByAura);
|
owner->CastSpell(owner,58227,true,castItem,triggeredByAura);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// Divine purpose
|
// Divine purpose
|
||||||
case 31871:
|
case 31871:
|
||||||
@@ -5467,7 +5467,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
|||||||
target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT);
|
target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// Glyph of Drain Soul
|
// Glyph of Drain Soul
|
||||||
case 58070:
|
case 58070:
|
||||||
{
|
{
|
||||||
triggered_spell_id = 58068;
|
triggered_spell_id = 58068;
|
||||||
@@ -6604,7 +6604,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
|||||||
// Windfury Weapon (Passive) 1-5 Ranks
|
// Windfury Weapon (Passive) 1-5 Ranks
|
||||||
case 33757:
|
case 33757:
|
||||||
{
|
{
|
||||||
if(GetTypeId()!=TYPEID_PLAYER || !castItem || !castItem->IsEquipped() || !pVictim || !pVictim->isAlive())
|
if(GetTypeId()!=TYPEID_PLAYER || !castItem || !castItem->IsEquipped() || !pVictim || !pVictim->isAlive())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// custom cooldown processing case
|
// custom cooldown processing case
|
||||||
|
|||||||
+3
-3
@@ -260,7 +260,7 @@ World::AddSession_ (WorldSession* s)
|
|||||||
s->SendPacket(&pkt);
|
s->SendPacket(&pkt);
|
||||||
|
|
||||||
s->SendAccountDataTimes(GLOBAL_CACHE_MASK);
|
s->SendAccountDataTimes(GLOBAL_CACHE_MASK);
|
||||||
|
|
||||||
s->SendTutorialsData();
|
s->SendTutorialsData();
|
||||||
|
|
||||||
UpdateMaxSessionCounters ();
|
UpdateMaxSessionCounters ();
|
||||||
@@ -2584,12 +2584,12 @@ void World::LoadDBVersion()
|
|||||||
|
|
||||||
void World::ProcessStartEvent()
|
void World::ProcessStartEvent()
|
||||||
{
|
{
|
||||||
isEventKillStart = true;
|
isEventKillStart = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::ProcessStopEvent()
|
void World::ProcessStopEvent()
|
||||||
{
|
{
|
||||||
isEventKillStart = false;
|
isEventKillStart = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::UpdateAreaDependentAuras()
|
void World::UpdateAreaDependentAuras()
|
||||||
|
|||||||
+13
-13
@@ -614,17 +614,17 @@ class World
|
|||||||
static float GetVisibleObjectGreyDistance() { return m_VisibleObjectGreyDistance; }
|
static float GetVisibleObjectGreyDistance() { return m_VisibleObjectGreyDistance; }
|
||||||
|
|
||||||
|
|
||||||
void SetWintergrapsTimer(uint32 timer, uint32 state)
|
void SetWintergrapsTimer(uint32 timer, uint32 state)
|
||||||
{
|
{
|
||||||
m_WintergrapsTimer = timer;
|
m_WintergrapsTimer = timer;
|
||||||
m_WintergrapsState = state;
|
m_WintergrapsState = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 GetWintergrapsTimer() { return m_WintergrapsTimer; }
|
uint32 GetWintergrapsTimer() { return m_WintergrapsTimer; }
|
||||||
uint32 GetWintergrapsState() { return m_WintergrapsState; }
|
uint32 GetWintergrapsState() { return m_WintergrapsState; }
|
||||||
|
|
||||||
uint32 m_WintergrapsTimer;
|
uint32 m_WintergrapsTimer;
|
||||||
uint32 m_WintergrapsState;
|
uint32 m_WintergrapsState;
|
||||||
|
|
||||||
void ProcessCliCommands();
|
void ProcessCliCommands();
|
||||||
void QueueCliCommand( CliCommandHolder::Print* zprintf, char const* input ) { cliCmdQueue.add(new CliCommandHolder(input, zprintf)); }
|
void QueueCliCommand( CliCommandHolder::Print* zprintf, char const* input ) { cliCmdQueue.add(new CliCommandHolder(input, zprintf)); }
|
||||||
@@ -655,11 +655,11 @@ class World
|
|||||||
|
|
||||||
void UpdateAreaDependentAuras();
|
void UpdateAreaDependentAuras();
|
||||||
|
|
||||||
void ProcessStartEvent();
|
void ProcessStartEvent();
|
||||||
void ProcessStopEvent();
|
void ProcessStopEvent();
|
||||||
bool GetEventKill() { return isEventKillStart; }
|
bool GetEventKill() { return isEventKillStart; }
|
||||||
|
|
||||||
bool isEventKillStart;
|
bool isEventKillStart;
|
||||||
protected:
|
protected:
|
||||||
void _UpdateGameTime();
|
void _UpdateGameTime();
|
||||||
// callback for UpdateRealmCharacters
|
// callback for UpdateRealmCharacters
|
||||||
|
|||||||
@@ -1013,7 +1013,7 @@ int WorldSocket::iSendPartialPacket(WorldPacket& pct)
|
|||||||
return 0; // nothing written, still remaining data => 0
|
return 0; // nothing written, still remaining data => 0
|
||||||
|
|
||||||
m_Crypt.EncryptSend(header.header, header.getHeaderLength());
|
m_Crypt.EncryptSend(header.header, header.getHeaderLength());
|
||||||
|
|
||||||
if (m_OutBuffer->copy((char*) header.header, header.getHeaderLength()) == -1)
|
if (m_OutBuffer->copy((char*) header.header, header.getHeaderLength()) == -1)
|
||||||
return 0; // no space left. This should not happend. Just return 0 as nothing written and still remaining data
|
return 0; // no space left. This should not happend. Just return 0 as nothing written and still remaining data
|
||||||
|
|
||||||
@@ -1033,10 +1033,9 @@ int WorldSocket::iSendPartialPacket(WorldPacket& pct)
|
|||||||
|
|
||||||
if (m_OutBuffer->copy((char*) (pct.contents() + pct.rpos()), remainingLen) == -1)
|
if (m_OutBuffer->copy((char*) (pct.contents() + pct.rpos()), remainingLen) == -1)
|
||||||
ACE_ASSERT (false);
|
ACE_ASSERT (false);
|
||||||
|
|
||||||
return 1; // some byte written and packet completed
|
return 1; // some byte written and packet completed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool WorldSocket::iFlushPacketQueue()
|
bool WorldSocket::iFlushPacketQueue()
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -348,7 +348,7 @@ public:
|
|||||||
template<class type>
|
template<class type>
|
||||||
inline bool operator < (type & right)
|
inline bool operator < (type & right)
|
||||||
{
|
{
|
||||||
for (uint8 i=3; i>0; i--)
|
for (uint8 i=3; i > 0; --i)
|
||||||
{
|
{
|
||||||
if (part[i-1]<right.part[i-1])
|
if (part[i-1]<right.part[i-1])
|
||||||
return 1;
|
return 1;
|
||||||
@@ -361,7 +361,7 @@ public:
|
|||||||
template<class type>
|
template<class type>
|
||||||
inline bool operator < (type & right) const
|
inline bool operator < (type & right) const
|
||||||
{
|
{
|
||||||
for (uint8 i=3; i>0; i--)
|
for (uint8 i = 3; i > 0; --i)
|
||||||
{
|
{
|
||||||
if (part[i-1]<right.part[i-1])
|
if (part[i-1]<right.part[i-1])
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user