aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/bnetserver/Packets/PacketManager.h2
-rw-r--r--src/server/game/DataStores/DBCStores.cpp2
-rw-r--r--src/server/game/DataStores/DBCStructure.h6
-rw-r--r--src/server/game/Entities/Creature/Creature.h1
-rw-r--r--src/server/game/Entities/Item/Item.cpp4
-rw-r--r--src/server/game/Entities/Player/Player.cpp20
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp2
-rw-r--r--src/server/game/Globals/ObjectMgr.h4
-rw-r--r--src/server/game/Handlers/QueryHandler.cpp105
-rw-r--r--src/server/game/Movement/MotionMaster.cpp2
-rw-r--r--src/server/game/Server/Packets/QueryPackets.cpp88
-rw-r--r--src/server/game/Server/Packets/QueryPackets.h73
-rw-r--r--src/server/game/Server/Protocol/Opcodes.cpp5
-rw-r--r--src/server/game/Server/WorldSession.h7
-rw-r--r--src/server/game/Spells/SpellInfo.cpp4
-rw-r--r--src/server/ipc/ZmqContext.h2
-rw-r--r--src/server/ipc/ZmqListener.h4
-rw-r--r--src/server/ipc/ZmqMux.h2
-rw-r--r--src/server/scripts/Maelstrom/Stonecore/boss_corborus.cpp6
-rw-r--r--src/server/scripts/Maelstrom/Stonecore/boss_ozruk.cpp6
-rw-r--r--src/server/scripts/Maelstrom/Stonecore/boss_slabhide.cpp10
-rw-r--r--src/server/scripts/Maelstrom/Stonecore/instance_stonecore.cpp2
-rw-r--r--src/server/scripts/Maelstrom/Stonecore/stonecore.cpp4
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp2
24 files changed, 248 insertions, 115 deletions
diff --git a/src/server/bnetserver/Packets/PacketManager.h b/src/server/bnetserver/Packets/PacketManager.h
index 1e64e6a502c..d36aed8fd22 100644
--- a/src/server/bnetserver/Packets/PacketManager.h
+++ b/src/server/bnetserver/Packets/PacketManager.h
@@ -37,7 +37,7 @@ namespace Battlenet
{
typedef ClientPacket*(*PacketCreateFn)(PacketHeader const& header, BitStream& stream);
- struct PacketInfo
+ struct PacketInfo
{
PacketCreateFn Constructor;
char const* Name;
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index 333b7f5a2c2..d3c21c99968 100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -373,7 +373,7 @@ void LoadDBCStores(const std::string& dataPath)
PowersByClass[power->ClassID][power->PowerType] = index;
}
}
-
+
LoadDBC(availableDbcLocales, bad_dbc_files, sChrSpecializationStore, dbcPath, "ChrSpecialization.dbc");
LoadDBC(availableDbcLocales, bad_dbc_files, sCinematicSequencesStore, dbcPath, "CinematicSequences.dbc");//19116
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index e1f6344e067..49877769810 100644
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -1408,13 +1408,13 @@ struct ItemRandomPropertiesEntry
{
uint32 ID; // 0
//char* Name; // 1
- uint32 Enchantment[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 2-6
+ uint32 Enchantment[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 2-6
char* Name_lang; // 7
};
struct ItemRandomSuffixEntry
{
- uint32 ID; // 0
+ uint32 ID; // 0
char* Name_lang; // 1
//char* InternalName; // 2
uint32 Enchantment[MAX_ITEM_ENCHANTMENT_EFFECTS]; // 3-7
@@ -1473,7 +1473,7 @@ struct LFGDungeonEntry
//uint32 BonusReputationAmount; // 23
//uint32 MentorCharLevel; // 24
//uint32 MentorItemLevel; // 25
-
+
// Helpers
uint32 Entry() const { return ID + (Type << 24); }
};
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index 3acd386c416..eb2dc5171cc 100644
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -70,6 +70,7 @@ enum CreatureFlagsExtra
#define MAX_KILL_CREDIT 2
#define MAX_CREATURE_MODELS 4
#define MAX_CREATURE_QUEST_ITEMS 6
+#define MAX_CREATURE_NAMES 4
#define CREATURE_MAX_SPELLS 8
// from `creature_template` table
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index 4b4874666fd..74c6f7516db 100644
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -74,7 +74,7 @@ void AddItemsSetItem(Player* player, Item* item)
}
++eff->item_count;
-
+
ItemSetSpells& spells = sItemSetSpellsStore[setid];
for (uint32 x = 0; x < spells.size(); ++x)
@@ -140,7 +140,7 @@ void RemoveItemsSetItem(Player*player, ItemTemplate const* proto)
return;
--eff->item_count;
-
+
ItemSetSpells& spells = sItemSetSpellsStore[setid];
for (uint32 x = 0; x < spells.size(); x++)
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index c1088c0a406..3fb7c8572fb 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -3272,7 +3272,7 @@ bool Player::AddTalent(uint32 talentId, uint8 spec)
TC_LOG_ERROR("spells", "Player::addTalent: Talent %u not found", talentId);
return false;
}
-
+
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(talentEntry->SpellID);
if (!spellInfo)
{
@@ -4119,10 +4119,10 @@ bool Player::ResetTalents(bool no_cost)
}
// Unlearn masteries
- ChrSpecializationEntry const* chrSpec = sChrSpecializationStore.LookupEntry(specID);
- for (uint32 i = 0; i < MAX_MASTERY_SPELLS; ++i)
- if (uint32 mastery = chrSpec->MasterySpellID[i])
- RemoveAurasDueToSpell(mastery);
+ if (ChrSpecializationEntry const* chrSpec = sChrSpecializationStore.LookupEntry(specID))
+ for (uint32 i = 0; i < MAX_MASTERY_SPELLS; ++i)
+ if (uint32 mastery = chrSpec->MasterySpellID[i])
+ RemoveAurasDueToSpell(mastery);
// Reset talents store
GetTalentGroupInfo(group)->Reset();
@@ -25598,16 +25598,16 @@ void Player::SendTalentsInfoData()
WorldPackets::Talent::UpdateTalentData packet;
packet.Info.ActiveGroup = GetActiveTalentGroup();
-
+
uint8 groupsCount = GetTalentGroupsCount();
for (uint8 i = 0; i < groupsCount; ++i)
{
TalentGroupInfo* groupInfo = GetTalentGroupInfo(i);
WorldPackets::Talent::TalentGroupInfo groupInfoPkt;
-
+
groupInfoPkt.SpecID = groupInfo->SpecID;
-
+
groupInfoPkt.TalentIDs.reserve(MAX_TALENT_TIERS);
for (uint32 x = 0; x < MAX_TALENT_TIERS; ++x)
{
@@ -25617,10 +25617,10 @@ void Player::SendTalentsInfoData()
groupInfoPkt.TalentIDs.push_back(groupInfo->Talents[x]);
}
-
+
for (uint32 x = 0; x < MAX_GLYPH_SLOT_INDEX; ++x)
groupInfoPkt.GlyphIDs[x] = groupInfo->Glyphs[x];
-
+
packet.Info.TalentGroups.push_back(groupInfoPkt);
}
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 8d90d73d0c1..89ded594990 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -8160,7 +8160,7 @@ int32 Unit::DealHeal(Unit* victim, uint32 addhealth)
bool Unit::IsMagnet() const
{
- // Grounding Totem
+ // Grounding Totem
if (GetUInt32Value(UNIT_CREATED_BY_SPELL) == 8177) /// @todo: find a more generic solution
return true;
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index fbf696770dc..bb392caeffb 100644
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -1353,7 +1353,7 @@ class ObjectMgr
void LoadRealmNames();
std::string GetRealmName(uint32 realm) const;
-
+
ExpansionRequirementContainer const& GetRaceExpansionRequirements() const { return _raceExpansionRequirementStore; }
uint8 GetRaceExpansionRequirement(uint8 race) const
{
@@ -1362,7 +1362,7 @@ class ObjectMgr
return itr->second;
return EXPANSION_CLASSIC;
}
-
+
ExpansionRequirementContainer const& GetClassExpansionRequirements() const { return _classExpansionRequirementStore; }
uint8 GetClassExpansionRequirement(uint8 class_) const
{
diff --git a/src/server/game/Handlers/QueryHandler.cpp b/src/server/game/Handlers/QueryHandler.cpp
index 7be46b4723b..490097ec647 100644
--- a/src/server/game/Handlers/QueryHandler.cpp
+++ b/src/server/game/Handlers/QueryHandler.cpp
@@ -32,6 +32,7 @@
#include "MapManager.h"
#include "BattlenetAccountMgr.h"
#include "CharacterPackets.h"
+#include "QueryPackets.h"
void WorldSession::SendNameQueryOpcode(ObjectGuid guid)
{
@@ -86,84 +87,48 @@ void WorldSession::SendQueryTimeResponse()
}
/// Only _static_ data is sent in this packet !!!
-void WorldSession::HandleCreatureQueryOpcode(WorldPacket& recvData)
+void WorldSession::HandleCreatureQuery(WorldPackets::Query::QueryCreature& packet)
{
- uint32 entry;
- recvData >> entry;
- ObjectGuid guid;
- recvData >> guid;
+ WorldPackets::Query::QueryCreatureResponse response;
- CreatureTemplate const* creatureInfo = sObjectMgr->GetCreatureTemplate(entry);
- if (creatureInfo)
- {
- std::string Name, FemaleName, SubName;
- Name = creatureInfo->Name;
- FemaleName = creatureInfo->FemaleName;
- SubName = creatureInfo->SubName;
+ CreatureTemplate const* creatureInfo = sObjectMgr->GetCreatureTemplate(packet.CreatureID);
- LocaleConstant locale = GetSessionDbLocaleIndex();
- if (locale >= 0)
- {
- if (CreatureLocale const* creatureLocale = sObjectMgr->GetCreatureLocale(entry))
- {
- ObjectMgr::GetLocaleString(creatureLocale->Name, locale, Name);
- ObjectMgr::GetLocaleString(creatureLocale->FemaleName, locale, FemaleName);
- ObjectMgr::GetLocaleString(creatureLocale->SubName, locale, SubName);
- }
- }
-
- TC_LOG_DEBUG("network", "WORLD: CMSG_CREATURE_QUERY '%s' - Entry: %u.", creatureInfo->Name.c_str(), entry);
-
- WorldPacket data(SMSG_CREATURE_QUERY_RESPONSE, 100); // guess size
- data << uint32(entry); // creature entry
- data << Name; // Name
-
- for (uint8 i = 0; i < 3; i++)
- data << uint8(0); // name2, ..., name3
-
- data << FemaleName; // FemaleName
-
- for (uint8 i = 0; i < 3; i++)
- data << uint8(0); // name5, ..., name8
-
- data << SubName; // SubName
- data << creatureInfo->IconName; // "Directions" for guard, string for Icons 2.3.0
- data << uint32(creatureInfo->type_flags); // flags
- data << uint32(creatureInfo->type_flags2); // unknown meaning
- data << uint32(creatureInfo->type); // CreatureType.dbc
- data << uint32(creatureInfo->family); // CreatureFamily.dbc
- data << uint32(creatureInfo->rank); // Creature Rank (elite, boss, etc)
- data << uint32(creatureInfo->KillCredit[0]); // new in 3.1, kill credit
- data << uint32(creatureInfo->KillCredit[1]); // new in 3.1, kill credit
- data << uint32(creatureInfo->Modelid1); // Modelid1
- data << uint32(creatureInfo->Modelid2); // Modelid2
- data << uint32(creatureInfo->Modelid3); // Modelid3
- data << uint32(creatureInfo->Modelid4); // Modelid4
- data << float(creatureInfo->ModHealth); // dmg/hp modifier
- data << float(creatureInfo->ModMana); // dmg/mana modifier
- data << uint8(creatureInfo->RacialLeader); // RacialLeader
+ response.CreatureID = packet.CreatureID;
+ if (creatureInfo)
+ {
+ response.Allow = true;
+
+ WorldPackets::Query::CreatureStats& stats = response.Stats;
+
+ stats.Title = creatureInfo->SubName;
+ stats.CursorName = creatureInfo->IconName;
+ stats.CreatureType = creatureInfo->type;
+ stats.CreatureFamily = creatureInfo->family;
+ stats.Classification = creatureInfo->rank;
+ stats.HpMulti = creatureInfo->ModHealth;
+ stats.EnergyMulti = creatureInfo->ModMana;
+ stats.Leader = creatureInfo->RacialLeader;
for (uint8 i = 0; i < MAX_CREATURE_QUEST_ITEMS; ++i)
- data << uint32(creatureInfo->questItems[i]); // itemId[6], quest drop
-
- data << uint32(creatureInfo->movementId); // CreatureMovementInfo.dbc
- data << uint32(creatureInfo->expansionUnknown); // unknown meaning
-
- SendPacket(&data);
-
- TC_LOG_DEBUG("network", "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE");
+ if (creatureInfo->questItems[i])
+ stats.QuestItems.push_back(creatureInfo->questItems[i]);
+ stats.CreatureMovementInfoID = creatureInfo->movementId;
+ stats.RequiredExpansion = creatureInfo->expansionUnknown;
+ stats.Flags[0] = creatureInfo->type_flags;
+ stats.Flags[1] = creatureInfo->type_flags2;
+ for (uint32 i = 0; i < MAX_KILL_CREDIT; ++i)
+ stats.ProxyCreatureID[i] = creatureInfo->KillCredit[i];
+ stats.CreatureDisplayID[0] = creatureInfo->Modelid1;
+ stats.CreatureDisplayID[1] = creatureInfo->Modelid2;
+ stats.CreatureDisplayID[2] = creatureInfo->Modelid3;
+ stats.CreatureDisplayID[3] = creatureInfo->Modelid4;
+ stats.Name[0] = creatureInfo->Name;
+ stats.NameAlt[0] = creatureInfo->FemaleName;
}
else
- {
- TC_LOG_DEBUG("network", "WORLD: CMSG_CREATURE_QUERY - NO CREATURE INFO! (%s, ENTRY: %u)",
- guid.ToString().c_str(), entry);
-
- WorldPacket data(SMSG_CREATURE_QUERY_RESPONSE, 4);
- data << uint32(entry | 0x80000000);
- SendPacket(&data);
+ response.Allow = false;
- TC_LOG_DEBUG("network", "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE");
- }
+ SendPacket(response.Write());
}
/// Only _static_ data is sent in this packet !!!
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index 131a6e381e0..f77cdc392ff 100644
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -256,7 +256,7 @@ void MotionMaster::MoveChase(Unit* target, float dist, float angle)
else
{
TC_LOG_DEBUG("misc", "Creature (Entry: %u %s) chase %s",
- _owner->GetEntry(),
+ _owner->GetEntry(),
_owner->GetGUID().ToString().c_str(),
target->GetGUID().ToString().c_str());
Mutate(new ChaseMovementGenerator<Creature>(target, dist, angle), MOTION_SLOT_ACTIVE);
diff --git a/src/server/game/Server/Packets/QueryPackets.cpp b/src/server/game/Server/Packets/QueryPackets.cpp
new file mode 100644
index 00000000000..23c851d36ce
--- /dev/null
+++ b/src/server/game/Server/Packets/QueryPackets.cpp
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "QueryPackets.h"
+
+void WorldPackets::Query::QueryCreature::Read()
+{
+ _worldPacket >> CreatureID;
+}
+
+WorldPacket const* WorldPackets::Query::QueryCreatureResponse::Write()
+{
+ _worldPacket << CreatureID;
+ _worldPacket.WriteBit(Allow);
+
+ if (Allow)
+ {
+ _worldPacket.WriteBits(uint32(Stats.Title.length()+1), 11);
+ _worldPacket.WriteBits(uint32(Stats.TitleAlt.length()+1), 11);
+ _worldPacket.WriteBits(uint32(Stats.CursorName.length()+1), 6);
+ _worldPacket.WriteBit(Stats.Leader);
+
+ for (uint32 i = 0; i < MAX_CREATURE_NAMES; ++i)
+ {
+ _worldPacket.WriteBits(uint32(Stats.Name[i].length()+1), 11);
+ _worldPacket.WriteBits(uint32(Stats.NameAlt[i].length()+1), 11);
+ }
+
+ for (uint32 i = 0; i < MAX_CREATURE_NAMES; ++i)
+ {
+ if (!Stats.Name[i].empty())
+ _worldPacket << Stats.Name[i];
+ if (!Stats.NameAlt[i].empty())
+ _worldPacket << Stats.NameAlt[i];
+ }
+
+ _worldPacket << Stats.Flags[0];
+ _worldPacket << Stats.Flags[1];
+ _worldPacket << Stats.CreatureType;
+ _worldPacket << Stats.CreatureFamily;
+ _worldPacket << Stats.Classification;
+
+ for (uint32 i = 0; i < MAX_KILL_CREDIT; ++i)
+ _worldPacket << Stats.ProxyCreatureID[i];
+
+ for (uint32 i = 0; i < MAX_CREATURE_MODELS; ++i)
+ _worldPacket << Stats.CreatureDisplayID[i];
+
+ _worldPacket << Stats.HpMulti;
+ _worldPacket << Stats.EnergyMulti;
+
+ _worldPacket << int32(Stats.QuestItems.size());
+ _worldPacket << Stats.CreatureMovementInfoID;
+ _worldPacket << Stats.RequiredExpansion;
+
+ _worldPacket << int32(0); // FlagQuest
+
+ if (Stats.Title.length())
+ _worldPacket << Stats.Title;
+
+ if (Stats.TitleAlt.length())
+ _worldPacket << Stats.TitleAlt;
+
+ if (Stats.CursorName.length())
+ _worldPacket << Stats.CursorName;
+
+ for (uint32 i = 0; i < Stats.QuestItems.size(); ++i)
+ _worldPacket << Stats.QuestItems[i];
+ }
+
+ _worldPacket.FlushBits();
+
+ return &_worldPacket;
+}
diff --git a/src/server/game/Server/Packets/QueryPackets.h b/src/server/game/Server/Packets/QueryPackets.h
new file mode 100644
index 00000000000..49bb5847400
--- /dev/null
+++ b/src/server/game/Server/Packets/QueryPackets.h
@@ -0,0 +1,73 @@
+/*
+* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
+*
+* This program is free software; you can redistribute it and/or modify it
+* under the terms of the GNU General Public License as published by the
+* Free Software Foundation; either version 2 of the License, or (at your
+* option) any later version.
+*
+* This program is distributed in the hope that it will be useful, but WITHOUT
+* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+* more details.
+*
+* You should have received a copy of the GNU General Public License along
+* with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef QueryPackets_h__
+#define QueryPackets_h__
+
+#include "Packet.h"
+#include "Creature.h"
+
+namespace WorldPackets
+{
+ namespace Query
+ {
+ class QueryCreature final : public ClientPacket
+ {
+ public:
+ QueryCreature(WorldPacket&& packet) : ClientPacket(CMSG_CREATURE_QUERY, std::move(packet)) { }
+
+ void Read() override;
+
+ uint32 CreatureID = 0;
+ };
+
+ struct CreatureStats
+ {
+ std::string Title;
+ std::string TitleAlt;
+ std::string CursorName;
+ int32 CreatureType = 0;
+ int32 CreatureFamily = 0;
+ int32 Classification = 0;
+ float HpMulti = 0.0f;
+ float EnergyMulti = 0.0f;
+ bool Leader = false;
+ std::vector<int32> QuestItems;
+ uint32 CreatureMovementInfoID = 0;
+ uint32 RequiredExpansion = 0;
+ uint32 Flags[2];
+ uint32 ProxyCreatureID[MAX_KILL_CREDIT];
+ uint32 CreatureDisplayID[MAX_CREATURE_MODELS];
+ std::string Name[MAX_CREATURE_NAMES];
+ std::string NameAlt[MAX_CREATURE_NAMES];
+ };
+
+ class QueryCreatureResponse final : public ServerPacket
+ {
+ public:
+ QueryCreatureResponse() : ServerPacket(SMSG_CREATURE_QUERY_RESPONSE, 2+4+4+4+12) { }
+
+ WorldPacket const* Write() override;
+
+ bool Allow = false;
+ CreatureStats Stats;
+ uint32 CreatureID = 0;
+ };
+ }
+}
+
+#endif // QueryPackets_h__
diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp
index 556560c5e70..e28bf0f0bd4 100644
--- a/src/server/game/Server/Protocol/Opcodes.cpp
+++ b/src/server/game/Server/Protocol/Opcodes.cpp
@@ -22,6 +22,7 @@
#include "Packets/GuildPackets.h"
#include "Packets/TradePackets.h"
#include "Packets/MiscPackets.h"
+#include "Packets/QueryPackets.h"
template<class PacketClass, void(WorldSession::*HandlerFunction)(PacketClass&)>
class PacketHandler : public OpcodeHandler
@@ -250,7 +251,7 @@ void OpcodeTable::Initialize()
DEFINE_OPCODE_HANDLER_OLD(CMSG_CONNECT_TO_FAILED, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL );
DEFINE_OPCODE_HANDLER_OLD(CMSG_CONTACT_LIST, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleContactListOpcode );
DEFINE_OPCODE_HANDLER_OLD(CMSG_CORPSE_MAP_POSITION_QUERY, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleCorpseMapPositionQuery );
- DEFINE_OPCODE_HANDLER_OLD(CMSG_CREATURE_QUERY, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::HandleCreatureQueryOpcode );
+ DEFINE_HANDLER(CMSG_CREATURE_QUERY, STATUS_LOGGEDIN, PROCESS_INPLACE, WorldPackets::Query::QueryCreature, &WorldSession::HandleCreatureQuery);
DEFINE_OPCODE_HANDLER_OLD(CMSG_DANCE_QUERY, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL );
DEFINE_OPCODE_HANDLER_OLD(CMSG_DB_QUERY_BULK, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL );
DEFINE_OPCODE_HANDLER_OLD(CMSG_DEL_FRIEND, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleDelFriendOpcode );
@@ -839,7 +840,7 @@ void OpcodeTable::Initialize()
DEFINE_SERVER_OPCODE_HANDLER(SMSG_CORPSE_MAP_POSITION_QUERY_RESPONSE, STATUS_UNHANDLED);
DEFINE_SERVER_OPCODE_HANDLER(SMSG_CORPSE_NOT_IN_INSTANCE, STATUS_UNHANDLED);
DEFINE_SERVER_OPCODE_HANDLER(SMSG_CORPSE_RECLAIM_DELAY, STATUS_UNHANDLED);
- DEFINE_SERVER_OPCODE_HANDLER(SMSG_CREATURE_QUERY_RESPONSE, STATUS_UNHANDLED);
+ DEFINE_SERVER_OPCODE_HANDLER(SMSG_CREATURE_QUERY_RESPONSE, STATUS_NEVER);
DEFINE_SERVER_OPCODE_HANDLER(SMSG_CRITERIA_DELETED, STATUS_UNHANDLED);
DEFINE_SERVER_OPCODE_HANDLER(SMSG_CRITERIA_UPDATE, STATUS_UNHANDLED);
DEFINE_SERVER_OPCODE_HANDLER(SMSG_CROSSED_INEBRIATION_THRESHOLD, STATUS_UNHANDLED);
diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h
index 6e863b9e580..36de09be5a2 100644
--- a/src/server/game/Server/WorldSession.h
+++ b/src/server/game/Server/WorldSession.h
@@ -110,6 +110,11 @@ namespace WorldPackets
{
class ViolenceLevel;
}
+
+ namespace Query
+ {
+ class QueryCreature;
+ }
}
enum AccountDataType
@@ -579,7 +584,7 @@ class WorldSession
void HandleQueryTimeOpcode(WorldPacket& recvPacket);
- void HandleCreatureQueryOpcode(WorldPacket& recvPacket);
+ void HandleCreatureQuery(WorldPackets::Query::QueryCreature& packet);
void HandleGameObjectQueryOpcode(WorldPacket& recvPacket);
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 8bef55128c4..451cc180cd3 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -865,7 +865,7 @@ SpellEffectInfo::StaticData SpellEffectInfo::_data[TOTAL_SPELL_EFFECTS] =
SpellInfo::SpellInfo(SpellEntry const* spellEntry, SpellEffectEntry const** effects)
{
Id = spellEntry->ID;
-
+
SpellName = spellEntry->Name_lang;
//Rank = spellEntry->Rank;
RuneCostID = spellEntry->RuneCostID;
@@ -886,7 +886,7 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry, SpellEffectEntry const** effe
SpellTargetRestrictionsId = spellEntry->TargetRestrictionsID;
SpellTotemsId = spellEntry->TotemsID;
SpellMiscId = spellEntry->MiscID;
-
+
// SpellMiscEntry
SpellMiscEntry const* _misc = GetSpellMisc();
Attributes = _misc ? _misc->Attributes : 0;
diff --git a/src/server/ipc/ZmqContext.h b/src/server/ipc/ZmqContext.h
index a6ad12b1b70..e1168eb97a3 100644
--- a/src/server/ipc/ZmqContext.h
+++ b/src/server/ipc/ZmqContext.h
@@ -24,7 +24,7 @@
/*
* We need to serialize access to zmq context otherwise stuff blows up.
*/
-class ZmqContext
+class ZmqContext
{
public:
~ZmqContext();
diff --git a/src/server/ipc/ZmqListener.h b/src/server/ipc/ZmqListener.h
index 8b79ba67f6d..370d8811781 100644
--- a/src/server/ipc/ZmqListener.h
+++ b/src/server/ipc/ZmqListener.h
@@ -24,8 +24,8 @@
class ZmqListener : public ZMQTask
{
/*
- * Read broadcasts from remote PUB socket, and forward them to
- * another socket.
+ * Read broadcasts from remote PUB socket, and forward them to
+ * another socket.
*
* from - client SUB socket
* to - listen PUSH socket
diff --git a/src/server/ipc/ZmqMux.h b/src/server/ipc/ZmqMux.h
index 4b81f11daaf..07336330253 100644
--- a/src/server/ipc/ZmqMux.h
+++ b/src/server/ipc/ZmqMux.h
@@ -23,7 +23,7 @@
#include <boost/thread/tss.hpp>
/*
- * Multiplexes zmq messages from many threads,
+ * Multiplexes zmq messages from many threads,
* and then passes them to another socket.
*/
class ZmqMux : public ZMQTask
diff --git a/src/server/scripts/Maelstrom/Stonecore/boss_corborus.cpp b/src/server/scripts/Maelstrom/Stonecore/boss_corborus.cpp
index 2d522928fce..01baf54eef7 100644
--- a/src/server/scripts/Maelstrom/Stonecore/boss_corborus.cpp
+++ b/src/server/scripts/Maelstrom/Stonecore/boss_corborus.cpp
@@ -119,7 +119,7 @@ class boss_corborus : public CreatureScript
events.ScheduleEvent(EVENT_CORBORUS_CHARGE, 1000);
break;
- }
+ }
default:
break;
}
@@ -192,7 +192,7 @@ class boss_corborus : public CreatureScript
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
DoCast(me, SPELL_CLEAR_ALL_DEBUFFS);
me->AttackStop();
-
+
DoCast(me, SPELL_SUBMERGE);
countTrashingCharge = 0;
@@ -298,7 +298,7 @@ class npc_rock_borer : public CreatureScript
break;
}
}
-
+
DoMeleeAttackIfReady();
}
diff --git a/src/server/scripts/Maelstrom/Stonecore/boss_ozruk.cpp b/src/server/scripts/Maelstrom/Stonecore/boss_ozruk.cpp
index 92c9bba4bc1..0b260de944a 100644
--- a/src/server/scripts/Maelstrom/Stonecore/boss_ozruk.cpp
+++ b/src/server/scripts/Maelstrom/Stonecore/boss_ozruk.cpp
@@ -102,7 +102,7 @@ class boss_ozruk : public CreatureScript
void JustSummoned(Creature* summon) override
{
- if (summon->GetEntry() != NPC_RUPTURE_CONTROLLER)
+ if (summon->GetEntry() != NPC_RUPTURE_CONTROLLER)
return;
summon->SetReactState(REACT_PASSIVE);
@@ -161,7 +161,7 @@ class boss_ozruk : public CreatureScript
me->AttackStop();
DoCast(me, SPELL_SHATTER);
events.ScheduleEvent(EVENT_START_ATTACK, 4600);
- // Spells are cast in same order everytime after Shatter, so we schedule them here
+ // Spells are cast in same order everytime after Shatter, so we schedule them here
events.ScheduleEvent(EVENT_ELEMENTIUM_BULWARK, urand(3000,4000));
events.ScheduleEvent(EVENT_GROUND_SLAM, urand(7000,9000));
events.ScheduleEvent(EVENT_ELEMENTIUM_SPIKE_SHIELD, urand(10000,12000));
@@ -178,7 +178,7 @@ class boss_ozruk : public CreatureScript
}
void RemoveBouncerSpikes()
- {
+ {
Vehicle* vehicle = me->GetVehicleKit();
if (!vehicle)
return;
diff --git a/src/server/scripts/Maelstrom/Stonecore/boss_slabhide.cpp b/src/server/scripts/Maelstrom/Stonecore/boss_slabhide.cpp
index 6827312deef..c5f0718e240 100644
--- a/src/server/scripts/Maelstrom/Stonecore/boss_slabhide.cpp
+++ b/src/server/scripts/Maelstrom/Stonecore/boss_slabhide.cpp
@@ -46,7 +46,7 @@ enum Spells
};
enum Entries
-{
+{
NPC_LAVA_FISSURE = 43242,
NPC_STALACTITE_TRIGGER_GROUND = 43357,
NPC_STALACTITE_TRIGGER = 43159,
@@ -174,7 +174,7 @@ class boss_slabhide : public CreatureScript
{
if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE)
return;
-
+
switch (id)
{
case POINT_SLABHIDE_INTRO:
@@ -295,7 +295,7 @@ class boss_slabhide : public CreatureScript
for (std::list<GameObject*>::const_iterator itr = listStalactite.begin(); itr != listStalactite.end(); ++itr)
(*itr)->Delete();
}
-
+
EventMap events;
};
@@ -570,7 +570,7 @@ public:
caster->GetGameObjectListWithEntryInGrid(goList, GO_STALACTITE, 40.0f);
if (goList.empty())
return;
-
+
unitList.remove_if(BehindObjectCheck(caster, goList));
}
@@ -595,5 +595,5 @@ void AddSC_boss_slabhide()
new spell_s81028_s80650_stalactite();
new spell_stalactite_mod_dest_height();
new spell_s92306_crystal_storm();
- new spell_s92300_crystal_storm();
+ new spell_s92300_crystal_storm();
}
diff --git a/src/server/scripts/Maelstrom/Stonecore/instance_stonecore.cpp b/src/server/scripts/Maelstrom/Stonecore/instance_stonecore.cpp
index ca5e40ab117..b2ac21a1edf 100644
--- a/src/server/scripts/Maelstrom/Stonecore/instance_stonecore.cpp
+++ b/src/server/scripts/Maelstrom/Stonecore/instance_stonecore.cpp
@@ -246,7 +246,7 @@ class instance_stonecore : public InstanceMapScript
ObjectGuid highPriestessAzilGUID;
ObjectGuid stonecoreTeleporterGUID[2];
GuidVector slabhideRockWallGUIDs;
-
+
EncounterState slabhideIntro;
};
diff --git a/src/server/scripts/Maelstrom/Stonecore/stonecore.cpp b/src/server/scripts/Maelstrom/Stonecore/stonecore.cpp
index 4ed84732eff..dc2fdb62d19 100644
--- a/src/server/scripts/Maelstrom/Stonecore/stonecore.cpp
+++ b/src/server/scripts/Maelstrom/Stonecore/stonecore.cpp
@@ -49,7 +49,7 @@ enum Spells
SPELL_TIGULE_AND_FORORS_SPECIAL_BLEND = 81220,
SPELL_IMPENDING_DOOM = 86838,
SPELL_IMPENDING_DOOM_CHANNEL = 86830,
-
+
// SPELL_PORTAL_VISUAL = 79754,
};
@@ -340,7 +340,7 @@ class spell_sc_twilight_documents : public SpellScriptLoader
return false;
return true;
}
-
+
void SetTarget(WorldObject*& target)
{
target = GetCaster()->FindNearestCreature(NPC_GENERIC_TRIGGER_LAB, 100.0f);
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index f8f788b0332..580549a3d99 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -2426,7 +2426,7 @@ public:
void HandleDummyEffect()
{
Unit* caster = GetCaster();
-
+
if (Creature* injuredStormwindInfantry = caster->FindNearestCreature(NPC_INJURED_STORMWIND_INFANTRY, 5.0f, true))
{
injuredStormwindInfantry->SetCreatorGUID(caster->GetGUID());