Core/Game: Include cleanup part 5
* ObjectMgr.h * Player.h * Unit.h * G3D should no longer propagate everywhere from Spline/MotionMaster
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "Creature.h"
|
||||
#include "CreatureAIImpl.h"
|
||||
#include "Log.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "Creature.h"
|
||||
#include "Errors.h"
|
||||
#include "Log.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "Player.h"
|
||||
|
||||
GuardAI::GuardAI(Creature* creature) : ScriptedAI(creature)
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "Errors.h"
|
||||
#include "Group.h"
|
||||
#include "Log.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Pet.h"
|
||||
#include "Player.h"
|
||||
|
||||
@@ -17,14 +17,15 @@
|
||||
*/
|
||||
|
||||
#include "UnitAI.h"
|
||||
#include "Player.h"
|
||||
#include "Creature.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "Spell.h"
|
||||
#include "CreatureAIImpl.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "Player.h"
|
||||
#include "Spell.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellMgr.h"
|
||||
|
||||
void UnitAI::AttackStart(Unit* victim)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,9 @@
|
||||
#include "CreatureTextMgr.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "MapReference.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "Player.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
@@ -17,11 +17,15 @@
|
||||
|
||||
#include "PlayerAI.h"
|
||||
#include "Creature.h"
|
||||
#include "Item.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
#include "Spell.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellHistory.h"
|
||||
#include "SpellMgr.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
|
||||
@@ -18,14 +18,18 @@
|
||||
|
||||
#include "ScriptedCreature.h"
|
||||
#include "AreaBoundary.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Cell.h"
|
||||
#include "CellImpl.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Spell.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
// Spell summary for ScriptedAI::SelectSpell
|
||||
struct TSpellSummary
|
||||
|
||||
@@ -27,6 +27,8 @@ EndScriptData */
|
||||
#include "Creature.h"
|
||||
#include "Group.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
|
||||
|
||||
@@ -25,8 +25,10 @@ EndScriptData */
|
||||
|
||||
#include "ScriptedFollowerAI.h"
|
||||
#include "Creature.h"
|
||||
#include "Log.h"
|
||||
#include "Group.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
*/
|
||||
|
||||
#include "SmartAI.h"
|
||||
#include "DB2Structure.h"
|
||||
#include "Creature.h"
|
||||
#include "GameObject.h"
|
||||
#include "Group.h"
|
||||
#include "Log.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "PetDefines.h"
|
||||
#include "Player.h"
|
||||
|
||||
@@ -20,21 +20,26 @@
|
||||
#include "ChatTextBuilder.h"
|
||||
#include "Creature.h"
|
||||
#include "CreatureTextMgr.h"
|
||||
#include "CreatureTextMgrImpl.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GameEventMgr.h"
|
||||
#include "GameObject.h"
|
||||
#include "GossipDef.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Group.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Random.h"
|
||||
#include "SmartAI.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "Vehicle.h"
|
||||
#include <G3D/Quat.h>
|
||||
|
||||
SmartScript::SmartScript()
|
||||
{
|
||||
@@ -1447,8 +1452,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
continue;
|
||||
|
||||
Position pos = (*itr)->GetPositionWithOffset(Position(e.target.x, e.target.y, e.target.z, e.target.o));
|
||||
G3D::Quat rot = G3D::Matrix3::fromEulerAnglesZYX(pos.GetOrientation(), 0.f, 0.f);
|
||||
summoner->SummonGameObject(e.action.summonGO.entry, pos, QuaternionData(rot.x, rot.y, rot.z, rot.w), e.action.summonGO.despawnTime);
|
||||
summoner->SummonGameObject(e.action.summonGO.entry, pos, QuaternionData::fromEulerAnglesZYX(pos.GetOrientation(), 0.f, 0.f), e.action.summonGO.despawnTime);
|
||||
}
|
||||
|
||||
delete targets;
|
||||
@@ -1457,8 +1461,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (e.GetTargetType() != SMART_TARGET_POSITION)
|
||||
break;
|
||||
|
||||
G3D::Quat rot = G3D::Matrix3::fromEulerAnglesZYX(e.target.o, 0.f, 0.f);
|
||||
summoner->SummonGameObject(e.action.summonGO.entry, Position(e.target.x, e.target.y, e.target.z, e.target.o), QuaternionData(rot.x, rot.y, rot.z, rot.w), e.action.summonGO.despawnTime);
|
||||
summoner->SummonGameObject(e.action.summonGO.entry, Position(e.target.x, e.target.y, e.target.z, e.target.o), QuaternionData::fromEulerAnglesZYX(e.target.o, 0.f, 0.f), e.action.summonGO.despawnTime);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_KILL_UNIT:
|
||||
@@ -1700,12 +1703,12 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
|
||||
if (!target)
|
||||
{
|
||||
G3D::Vector3 dest(e.target.x, e.target.y, e.target.z);
|
||||
Position dest(e.target.x, e.target.y, e.target.z);
|
||||
if (e.action.MoveToPos.transport)
|
||||
if (TransportBase* trans = me->GetDirectTransport())
|
||||
trans->CalculatePassengerPosition(dest.x, dest.y, dest.z);
|
||||
trans->CalculatePassengerPosition(dest.m_positionX, dest.m_positionY, dest.m_positionZ);
|
||||
|
||||
me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, dest.x, dest.y, dest.z, e.action.MoveToPos.disablePathfinding == 0);
|
||||
me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, dest, e.action.MoveToPos.disablePathfinding == 0);
|
||||
}
|
||||
else
|
||||
me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), e.action.MoveToPos.disablePathfinding == 0);
|
||||
|
||||
@@ -16,14 +16,20 @@
|
||||
*/
|
||||
|
||||
#include "SmartScriptMgr.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "CreatureTextMgr.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "GameEventMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Log.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "Timer.h"
|
||||
#include "UnitDefines.h"
|
||||
#include <algorithm>
|
||||
|
||||
SmartWaypointMgr* SmartWaypointMgr::instance()
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "AchievementMgr.h"
|
||||
#include "AchievementPackets.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "CellImpl.h"
|
||||
#include "ChatTextBuilder.h"
|
||||
#include "DatabaseEnv.h"
|
||||
@@ -25,11 +26,13 @@
|
||||
#include "Group.h"
|
||||
#include "Guild.h"
|
||||
#include "GuildMgr.h"
|
||||
#include "Item.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "Mail.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "World.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
struct VisibleAchievementCheck
|
||||
{
|
||||
@@ -448,7 +451,7 @@ void PlayerAchievementMgr::SendAchievementInfo(Player* receiver, uint32 /*achiev
|
||||
inspectedAchievements.Data.Progress.push_back(progress);
|
||||
}
|
||||
|
||||
receiver->GetSession()->SendPacket(inspectedAchievements.Write());
|
||||
receiver->SendDirectMessage(inspectedAchievements.Write());
|
||||
}
|
||||
|
||||
void PlayerAchievementMgr::CompletedAchievement(AchievementEntry const* achievement, Player* referencePlayer)
|
||||
@@ -795,7 +798,7 @@ void GuildAchievementMgr::SendAllData(Player const* receiver) const
|
||||
allGuildAchievements.Earned.push_back(earned);
|
||||
}
|
||||
|
||||
receiver->GetSession()->SendPacket(allGuildAchievements.Write());
|
||||
receiver->SendDirectMessage(allGuildAchievements.Write());
|
||||
}
|
||||
|
||||
void GuildAchievementMgr::SendAchievementInfo(Player* receiver, uint32 achievementId /*= 0*/) const
|
||||
@@ -828,7 +831,7 @@ void GuildAchievementMgr::SendAchievementInfo(Player* receiver, uint32 achieveme
|
||||
}
|
||||
}
|
||||
|
||||
receiver->GetSession()->SendPacket(guildCriteriaUpdate.Write());
|
||||
receiver->SendDirectMessage(guildCriteriaUpdate.Write());
|
||||
}
|
||||
|
||||
void GuildAchievementMgr::SendAllTrackedCriterias(Player* receiver, std::set<uint32> const& trackedCriterias) const
|
||||
@@ -854,7 +857,7 @@ void GuildAchievementMgr::SendAllTrackedCriterias(Player* receiver, std::set<uin
|
||||
guildCriteriaUpdate.Progress.push_back(guildCriteriaProgress);
|
||||
}
|
||||
|
||||
receiver->GetSession()->SendPacket(guildCriteriaUpdate.Write());
|
||||
receiver->SendDirectMessage(guildCriteriaUpdate.Write());
|
||||
}
|
||||
|
||||
void GuildAchievementMgr::SendAchievementMembers(Player* receiver, uint32 achievementId) const
|
||||
|
||||
@@ -19,11 +19,14 @@
|
||||
#include "AuctionHouseMgr.h"
|
||||
#include "AuctionHousePackets.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "Bag.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Common.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Item.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "Mail.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "Realm.h"
|
||||
|
||||
@@ -66,13 +66,10 @@ bool AuctionBotSeller::Initialize()
|
||||
const CreatureTemplateContainer* creatures = sObjectMgr->GetCreatureTemplates();
|
||||
std::set<uint32> tempItems;
|
||||
for (CreatureTemplateContainer::const_iterator it = creatures->begin(); it != creatures->end(); ++it)
|
||||
{
|
||||
if (const VendorItemData* data = sObjectMgr->GetNpcVendorItemList(it->first))
|
||||
{
|
||||
for (VendorItemList::const_iterator it2 = data->m_items.begin(); it2 != data->m_items.end(); ++it2)
|
||||
tempItems.insert((*it2)->item);
|
||||
}
|
||||
}
|
||||
for (VendorItem const& it2 : data->m_items)
|
||||
tempItems.insert(it2.item);
|
||||
|
||||
for (uint32 itemId : tempItems)
|
||||
npcItems.push_back(itemId);
|
||||
|
||||
|
||||
@@ -16,8 +16,10 @@
|
||||
*/
|
||||
|
||||
#include "BattlePetMgr.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Containers.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Item.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "BattlegroundPackets.h"
|
||||
#include "CellImpl.h"
|
||||
#include "CreatureTextMgr.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Group.h"
|
||||
@@ -31,7 +32,9 @@
|
||||
#include "MiscPackets.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "WorldSession.h"
|
||||
#include "WorldStatePackets.h"
|
||||
#include <G3D/g3dmath.h>
|
||||
|
||||
Battlefield::Battlefield()
|
||||
{
|
||||
|
||||
@@ -25,12 +25,13 @@
|
||||
|
||||
#include "BattlefieldTB.h"
|
||||
#include "AchievementMgr.h"
|
||||
#include "CreatureTextMgr.h"
|
||||
#include "Battleground.h"
|
||||
#include "CreatureTextMgr.h"
|
||||
#include "GameObject.h"
|
||||
#include "MapManager.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
#include "Random.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "World.h"
|
||||
|
||||
@@ -23,14 +23,17 @@
|
||||
#include "AchievementMgr.h"
|
||||
#include "Battleground.h"
|
||||
#include "CreatureTextMgr.h"
|
||||
#include "GameObject.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Log.h"
|
||||
#include "MapManager.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
#include "Random.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "World.h"
|
||||
#include "WorldSession.h"
|
||||
#include "WorldStatePackets.h"
|
||||
|
||||
struct BfWGCoordGY
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "Guild.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
#include "World.h"
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Group.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "BattlegroundPackets.h"
|
||||
#include "BattlegroundScore.h"
|
||||
#include "ChatPackets.h"
|
||||
#include "Creature.h"
|
||||
#include "CreatureTextMgr.h"
|
||||
#include "DatabaseEnv.h"
|
||||
@@ -30,8 +31,9 @@
|
||||
#include "Guild.h"
|
||||
#include "GuildMgr.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "MiscPackets.h"
|
||||
#include "Object.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "ReputationMgr.h"
|
||||
@@ -39,9 +41,8 @@
|
||||
#include "TemporarySummon.h"
|
||||
#include "Transport.h"
|
||||
#include "Util.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldStatePackets.h"
|
||||
#include <G3D/Quat.h>
|
||||
#include <cstdarg>
|
||||
|
||||
namespace Trinity
|
||||
{
|
||||
@@ -490,7 +491,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
|
||||
|
||||
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
|
||||
if (Player* player = ObjectAccessor::FindPlayer(itr->first))
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
|
||||
m_CountdownTimer = 0;
|
||||
}
|
||||
@@ -1147,7 +1148,7 @@ void Battleground::AddPlayer(Player* player)
|
||||
data << uint32(0); // unk
|
||||
data << uint32(countdownMaxForBGType - (GetElapsedTime() / 1000));
|
||||
data << uint32(countdownMaxForBGType);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1472,11 +1473,7 @@ bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float
|
||||
TC_LOG_DEBUG("bg.battleground", "Battleground::AddObject: gameoobject [entry: %u, object type: %u] for BG (map: %u) has zeroed rotation fields, "
|
||||
"orientation used temporally, but please fix the spawn", entry, type, m_MapId);
|
||||
|
||||
G3D::Quat fallbackRot = G3D::Matrix3::fromEulerAnglesZYX(o, 0.f, 0.f);
|
||||
rot.x = fallbackRot.x;
|
||||
rot.y = fallbackRot.y;
|
||||
rot.z = fallbackRot.z;
|
||||
rot.w = fallbackRot.w;
|
||||
rot = QuaternionData::fromEulerAnglesZYX(o, 0.f, 0.f);
|
||||
}
|
||||
|
||||
// Must be created this way, adding to godatamap would add it to the base map of the instance
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "Common.h"
|
||||
#include "Containers.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "DisableMgr.h"
|
||||
#include "GameEventMgr.h"
|
||||
#include "Log.h"
|
||||
@@ -619,7 +620,7 @@ void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode(Player* player, Battlegrou
|
||||
WorldPackets::Battleground::AreaSpiritHealerTime areaSpiritHealerTime;
|
||||
areaSpiritHealerTime.HealerGuid = guid;
|
||||
areaSpiritHealerTime.TimeLeft = time_;
|
||||
player->GetSession()->SendPacket(areaSpiritHealerTime.Write());
|
||||
player->SendDirectMessage(areaSpiritHealerTime.Write());
|
||||
}
|
||||
|
||||
bool BattlegroundMgr::IsArenaType(BattlegroundTypeId bgTypeId)
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "BattlegroundPackets.h"
|
||||
#include "Chat.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Group.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
|
||||
@@ -17,12 +17,13 @@
|
||||
*/
|
||||
|
||||
#include "BattlegroundAB.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "Creature.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GameObject.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "Player.h"
|
||||
#include "Random.h"
|
||||
#include "Util.h"
|
||||
|
||||
@@ -17,10 +17,13 @@
|
||||
*/
|
||||
|
||||
#include "BattlegroundAV.h"
|
||||
#include "Creature.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GameObject.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
@@ -20,9 +20,11 @@
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "BattlegroundPackets.h"
|
||||
#include "Creature.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GameObject.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
#include "Random.h"
|
||||
|
||||
@@ -17,9 +17,11 @@
|
||||
*/
|
||||
|
||||
#include "BattlegroundIC.h"
|
||||
#include "Creature.h"
|
||||
#include "GameObject.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "Transport.h"
|
||||
|
||||
@@ -17,11 +17,14 @@
|
||||
*/
|
||||
|
||||
#include "BattlegroundSA.h"
|
||||
#include "Creature.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GameObject.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
#include "Random.h"
|
||||
#include "UpdateData.h"
|
||||
|
||||
@@ -19,9 +19,11 @@
|
||||
#include "BattlegroundWS.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "BattlegroundPackets.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GameObject.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "Object.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "BlackMarketPackets.h"
|
||||
#include "Containers.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Item.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "Mail.h"
|
||||
@@ -28,6 +29,7 @@
|
||||
#include "Player.h"
|
||||
#include "Realm.h"
|
||||
#include "World.h"
|
||||
#include "WorldSession.h"
|
||||
#include <sstream>
|
||||
|
||||
BlackMarketMgr::BlackMarketMgr()
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "ChannelAppenders.h"
|
||||
#include "Chat.h"
|
||||
#include "ChatPackets.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
@@ -31,6 +32,7 @@
|
||||
#include "Player.h"
|
||||
#include "SocialMgr.h"
|
||||
#include "World.h"
|
||||
#include "WorldSession.h"
|
||||
#include <sstream>
|
||||
|
||||
Channel::Channel(uint32 channelId, uint32 team /*= 0*/, AreaTableEntry const* zoneEntry /*= nullptr*/) :
|
||||
|
||||
@@ -16,11 +16,13 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Channel.h"
|
||||
#include "ChannelMgr.h"
|
||||
#include "Channel.h"
|
||||
#include "ChannelPackets.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Player.h"
|
||||
#include "World.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
ChannelMgr::~ChannelMgr()
|
||||
{
|
||||
|
||||
@@ -23,12 +23,14 @@
|
||||
#include "ChatPackets.h"
|
||||
#include "Common.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Group.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Optional.h"
|
||||
#include "Player.h"
|
||||
#include "Realm.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
@@ -20,12 +20,15 @@
|
||||
#include "AchievementMgr.h"
|
||||
#include "Containers.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GameEventMgr.h"
|
||||
#include "GameObject.h"
|
||||
#include "Group.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Item.h"
|
||||
#include "Log.h"
|
||||
#include "LootMgr.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "Pet.h"
|
||||
@@ -34,6 +37,7 @@
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "World.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
char const* const ConditionMgr::StaticSourceTypeData[CONDITION_SOURCE_TYPE_MAX] =
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "DisableMgr.h"
|
||||
#include "CriteriaHandler.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "OutdoorPvP.h"
|
||||
|
||||
@@ -1517,10 +1517,6 @@ struct ItemSetSpellEntry
|
||||
uint8 Threshold;
|
||||
};
|
||||
|
||||
#define MAX_ITEM_PROTO_FLAGS 3
|
||||
#define MAX_ITEM_PROTO_SOCKETS 3
|
||||
#define MAX_ITEM_PROTO_STATS 10
|
||||
|
||||
struct ItemSparseEntry
|
||||
{
|
||||
uint32 ID;
|
||||
|
||||
@@ -613,6 +613,10 @@ enum FactionMasks
|
||||
// if none flags set then non-aggressive creature
|
||||
};
|
||||
|
||||
#define MAX_ITEM_PROTO_FLAGS 3
|
||||
#define MAX_ITEM_PROTO_SOCKETS 3
|
||||
#define MAX_ITEM_PROTO_STATS 10
|
||||
|
||||
enum MapTypes // Lua_IsInInstance
|
||||
{
|
||||
MAP_COMMON = 0, // none
|
||||
@@ -799,6 +803,16 @@ enum SpellCategoryFlags
|
||||
#define MAX_SPELL_EFFECTS 32
|
||||
#define MAX_EFFECT_MASK 0xFFFFFFFF
|
||||
|
||||
enum SpellItemEnchantmentFlags
|
||||
{
|
||||
ENCHANTMENT_CAN_SOULBOUND = 0x01,
|
||||
ENCHANTMENT_UNK1 = 0x02,
|
||||
ENCHANTMENT_UNK2 = 0x04,
|
||||
ENCHANTMENT_UNK3 = 0x08,
|
||||
ENCHANTMENT_COLLECTABLE = 0x100,
|
||||
ENCHANTMENT_HIDE_IF_NOT_COLLECTED = 0x200,
|
||||
};
|
||||
|
||||
enum SpellProcsPerMinuteModType
|
||||
{
|
||||
SPELL_PPM_MOD_HASTE = 1,
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "LFGMgr.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "DisableMgr.h"
|
||||
#include "GameEventMgr.h"
|
||||
#include "Group.h"
|
||||
@@ -27,6 +28,8 @@
|
||||
#include "LFGQueue.h"
|
||||
#include "LFGScripts.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
@@ -19,15 +19,16 @@
|
||||
* Interaction between core and LFGScripts
|
||||
*/
|
||||
|
||||
#include "Common.h"
|
||||
#include "Log.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "Player.h"
|
||||
#include "Group.h"
|
||||
#include "LFGScripts.h"
|
||||
#include "Common.h"
|
||||
#include "Group.h"
|
||||
#include "LFGMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
namespace lfg
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "Spline.h"
|
||||
#include "Transport.h"
|
||||
#include "Unit.h"
|
||||
#include "UpdateData.h"
|
||||
@@ -409,19 +410,17 @@ void AreaTrigger::UpdatePolygonOrientation()
|
||||
if (G3D::fuzzyEq(_previousCheckOrientation, newOrientation))
|
||||
return;
|
||||
|
||||
_polygonVertices = GetTemplate()->PolygonVertices;
|
||||
_polygonVertices.assign(GetTemplate()->PolygonVertices.begin(), GetTemplate()->PolygonVertices.end());
|
||||
|
||||
float angleSin = std::sin(newOrientation);
|
||||
float angleCos = std::cos(newOrientation);
|
||||
|
||||
// This is needed to rotate the vertices, following orientation
|
||||
for (G3D::Vector2& vertice : _polygonVertices)
|
||||
for (Position& vertice : _polygonVertices)
|
||||
{
|
||||
float tempX = vertice.x;
|
||||
float tempY = vertice.y;
|
||||
|
||||
vertice.x = tempX * angleCos - tempY * angleSin;
|
||||
vertice.y = tempX * angleSin + tempY * angleCos;
|
||||
float tempX = vertice.GetPositionX();
|
||||
float tempY = vertice.GetPositionY();
|
||||
vertice.Relocate(tempX * angleCos - tempY * angleSin, tempX * angleSin + tempY * angleCos);
|
||||
}
|
||||
|
||||
_previousCheckOrientation = newOrientation;
|
||||
@@ -451,10 +450,10 @@ bool AreaTrigger::CheckIsInPolygon2D(Position const* pos) const
|
||||
nextVertex = vertex + 1;
|
||||
}
|
||||
|
||||
float vertX_i = GetPositionX() + _polygonVertices[vertex].x;
|
||||
float vertY_i = GetPositionY() + _polygonVertices[vertex].y;
|
||||
float vertX_j = GetPositionX() + _polygonVertices[nextVertex].x;
|
||||
float vertY_j = GetPositionY() + _polygonVertices[nextVertex].y;
|
||||
float vertX_i = GetPositionX() + _polygonVertices[vertex].GetPositionX();
|
||||
float vertY_i = GetPositionY() + _polygonVertices[vertex].GetPositionY();
|
||||
float vertX_j = GetPositionX() + _polygonVertices[nextVertex].GetPositionX();
|
||||
float vertY_j = GetPositionY() + _polygonVertices[nextVertex].GetPositionY();
|
||||
|
||||
// following statement checks if testPoint.Y is below Y-coord of i-th vertex
|
||||
bool belowLowY = vertY_i > testY;
|
||||
@@ -561,42 +560,45 @@ void AreaTrigger::DoActions(Unit* unit)
|
||||
void AreaTrigger::UndoActions(Unit* unit)
|
||||
{
|
||||
for (AreaTriggerAction const& action : GetTemplate()->Actions)
|
||||
{
|
||||
if (action.ActionType == AREATRIGGER_ACTION_CAST || action.ActionType == AREATRIGGER_ACTION_ADDAURA)
|
||||
unit->RemoveAurasDueToSpell(action.Param, GetCasterGuid());
|
||||
}
|
||||
}
|
||||
|
||||
void AreaTrigger::InitSplineOffsets(std::vector<G3D::Vector3> splinePoints, uint32 timeToTarget)
|
||||
void AreaTrigger::InitSplineOffsets(std::vector<Position> const& splinePoints, uint32 timeToTarget)
|
||||
{
|
||||
float angleSin = std::sin(GetOrientation());
|
||||
float angleCos = std::cos(GetOrientation());
|
||||
|
||||
// This is needed to rotate the spline, following caster orientation
|
||||
for (G3D::Vector3& spline : splinePoints)
|
||||
std::vector<G3D::Vector3> rotatedPoints;
|
||||
rotatedPoints.reserve(splinePoints.size());
|
||||
for (Position const& spline : splinePoints)
|
||||
{
|
||||
float tempX = spline.x;
|
||||
float tempY = spline.y;
|
||||
float tempX = spline.GetPositionX();
|
||||
float tempY = spline.GetPositionY();
|
||||
float tempZ = GetPositionZ();
|
||||
|
||||
spline.x = (tempX * angleCos - tempY * angleSin) + GetPositionX();
|
||||
spline.y = (tempX * angleSin + tempY * angleCos) + GetPositionY();
|
||||
UpdateAllowedPositionZ(spline.x, spline.y, tempZ);
|
||||
spline.z += tempZ;
|
||||
UpdateAllowedPositionZ(spline.GetPositionX(), spline.GetPositionY(), tempZ);
|
||||
rotatedPoints.emplace_back(
|
||||
(tempX * angleCos - tempY * angleSin) + GetPositionX(),
|
||||
(tempX * angleSin + tempY * angleCos) + GetPositionY(),
|
||||
tempZ
|
||||
);
|
||||
}
|
||||
|
||||
InitSplines(splinePoints, timeToTarget);
|
||||
InitSplines(std::move(rotatedPoints), timeToTarget);
|
||||
}
|
||||
|
||||
void AreaTrigger::InitSplines(std::vector<G3D::Vector3> const& splinePoints, uint32 timeToTarget)
|
||||
void AreaTrigger::InitSplines(std::vector<G3D::Vector3> splinePoints, uint32 timeToTarget)
|
||||
{
|
||||
if (splinePoints.size() < 2)
|
||||
return;
|
||||
|
||||
_movementTime = 0;
|
||||
|
||||
_spline.init_spline(&splinePoints[0], splinePoints.size(), ::Movement::SplineBase::ModeLinear);
|
||||
_spline.initLengths();
|
||||
_spline = Trinity::make_unique<::Movement::Spline<int32>>();
|
||||
_spline->init_spline(&splinePoints[0], splinePoints.size(), ::Movement::SplineBase::ModeLinear);
|
||||
_spline->initLengths();
|
||||
|
||||
// should be sent in object create packets only
|
||||
m_uint32Values[AREATRIGGER_TIME_TO_TARGET] = timeToTarget;
|
||||
@@ -624,6 +626,11 @@ void AreaTrigger::InitSplines(std::vector<G3D::Vector3> const& splinePoints, uin
|
||||
_reachedDestination = false;
|
||||
}
|
||||
|
||||
bool AreaTrigger::HasSplines() const
|
||||
{
|
||||
return !_spline->empty();
|
||||
}
|
||||
|
||||
void AreaTrigger::UpdateSplinePosition(uint32 diff)
|
||||
{
|
||||
if (_reachedDestination)
|
||||
@@ -637,9 +644,9 @@ void AreaTrigger::UpdateSplinePosition(uint32 diff)
|
||||
if (_movementTime >= GetTimeToTarget())
|
||||
{
|
||||
_reachedDestination = true;
|
||||
_lastSplineIndex = int32(_spline.last());
|
||||
_lastSplineIndex = int32(_spline->last());
|
||||
|
||||
G3D::Vector3 lastSplinePosition = _spline.getPoint(_lastSplineIndex);
|
||||
G3D::Vector3 lastSplinePosition = _spline->getPoint(_lastSplineIndex);
|
||||
GetMap()->AreaTriggerRelocation(this, lastSplinePosition.x, lastSplinePosition.y, lastSplinePosition.z, GetOrientation());
|
||||
#ifdef TRINITY_DEBUG
|
||||
DebugVisualizePosition();
|
||||
@@ -669,15 +676,15 @@ void AreaTrigger::UpdateSplinePosition(uint32 diff)
|
||||
|
||||
int lastPositionIndex = 0;
|
||||
float percentFromLastPoint = 0;
|
||||
_spline.computeIndex(currentTimePercent, lastPositionIndex, percentFromLastPoint);
|
||||
_spline->computeIndex(currentTimePercent, lastPositionIndex, percentFromLastPoint);
|
||||
|
||||
G3D::Vector3 currentPosition;
|
||||
_spline.evaluate_percent(lastPositionIndex, percentFromLastPoint, currentPosition);
|
||||
_spline->evaluate_percent(lastPositionIndex, percentFromLastPoint, currentPosition);
|
||||
|
||||
float orientation = GetOrientation();
|
||||
if (GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_FACE_MOVEMENT_DIR))
|
||||
{
|
||||
G3D::Vector3 const& nextPoint = _spline.getPoint(lastPositionIndex + 1);
|
||||
G3D::Vector3 const& nextPoint = _spline->getPoint(lastPositionIndex + 1);
|
||||
orientation = GetAngle(nextPoint.x, nextPoint.y);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#define TRINITYCORE_AREATRIGGER_H
|
||||
|
||||
#include "Object.h"
|
||||
#include "Spline.h"
|
||||
#include "MapObject.h"
|
||||
|
||||
class AreaTriggerTemplate;
|
||||
@@ -31,6 +30,17 @@ class AuraEffect;
|
||||
|
||||
struct AreaTriggerPolygonVertice;
|
||||
|
||||
namespace G3D
|
||||
{
|
||||
class Vector2;
|
||||
class Vector3;
|
||||
}
|
||||
namespace Movement
|
||||
{
|
||||
template<typename length_type>
|
||||
class Spline;
|
||||
}
|
||||
|
||||
class TC_GAME_API AreaTrigger : public WorldObject, public GridObject<AreaTrigger>, public MapObject
|
||||
{
|
||||
public:
|
||||
@@ -71,10 +81,10 @@ class TC_GAME_API AreaTrigger : public WorldObject, public GridObject<AreaTrigge
|
||||
|
||||
Position const& GetRollPitchYaw() const { return _rollPitchYaw; }
|
||||
Position const& GetTargetRollPitchYaw() const { return _targetRollPitchYaw; }
|
||||
void InitSplineOffsets(std::vector<G3D::Vector3> splinePoints, uint32 timeToTarget);
|
||||
void InitSplines(std::vector<G3D::Vector3> const& splinePoints, uint32 timeToTarget);
|
||||
bool HasSplines() const { return !_spline.empty(); }
|
||||
::Movement::Spline<int32> const& GetSpline() const { return _spline; }
|
||||
void InitSplineOffsets(std::vector<Position> const& splinePoints, uint32 timeToTarget);
|
||||
void InitSplines(std::vector<G3D::Vector3> splinePoints, uint32 timeToTarget);
|
||||
bool HasSplines() const;
|
||||
::Movement::Spline<int32> const& GetSpline() const { return *_spline; }
|
||||
uint32 GetElapsedTimeForMovement() const { return GetTimeSinceCreated(); } /// @todo: research the right value, in sniffs both timers are nearly identical
|
||||
|
||||
void UpdateShape();
|
||||
@@ -111,8 +121,8 @@ class TC_GAME_API AreaTrigger : public WorldObject, public GridObject<AreaTrigge
|
||||
|
||||
Position _rollPitchYaw;
|
||||
Position _targetRollPitchYaw;
|
||||
std::vector<G3D::Vector2> _polygonVertices;
|
||||
::Movement::Spline<int32> _spline;
|
||||
std::vector<Position> _polygonVertices;
|
||||
std::unique_ptr<::Movement::Spline<int32>> _spline;
|
||||
|
||||
bool _reachedDestination;
|
||||
int32 _lastSplineIndex;
|
||||
|
||||
@@ -65,9 +65,10 @@ void AreaTriggerTemplate::InitMaxSearchRadius()
|
||||
if (PolygonDatas.Height <= 0.0f)
|
||||
PolygonDatas.Height = 1.0f;
|
||||
|
||||
for (G3D::Vector2 const& vertice : PolygonVertices)
|
||||
Position center(0.0f, 0.0f);
|
||||
for (TaggedPosition<Position::XY> const& vertice : PolygonVertices)
|
||||
{
|
||||
float pointDist = vertice.length();
|
||||
float pointDist = center.GetExactDist2d(vertice);
|
||||
|
||||
if (pointDist > MaxSearchRadius)
|
||||
MaxSearchRadius = pointDist;
|
||||
|
||||
@@ -19,14 +19,9 @@
|
||||
#define TRINITYCORE_AREATRIGGER_TEMPLATE_H
|
||||
|
||||
#include "Define.h"
|
||||
#include "Position.h"
|
||||
#include <vector>
|
||||
|
||||
namespace G3D
|
||||
{
|
||||
class Vector2;
|
||||
class Vector3;
|
||||
}
|
||||
|
||||
#define MAX_AREATRIGGER_ENTITY_DATA 6
|
||||
#define MAX_AREATRIGGER_SCALE 7
|
||||
|
||||
@@ -117,8 +112,8 @@ public:
|
||||
uint32 Flags;
|
||||
uint32 ScriptId;
|
||||
float MaxSearchRadius;
|
||||
std::vector<G3D::Vector2> PolygonVertices;
|
||||
std::vector<G3D::Vector2> PolygonVerticesTarget;
|
||||
std::vector<TaggedPosition<Position::XY>> PolygonVertices;
|
||||
std::vector<TaggedPosition<Position::XY>> PolygonVerticesTarget;
|
||||
std::vector<AreaTriggerAction> Actions;
|
||||
|
||||
union
|
||||
@@ -186,7 +181,7 @@ public:
|
||||
AreaTriggerScaleInfo ScaleInfo;
|
||||
|
||||
AreaTriggerTemplate const* Template;
|
||||
std::vector<G3D::Vector3> SplinePoints;
|
||||
std::vector<Position> SplinePoints;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
#include "Common.h"
|
||||
#include "Corpse.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
#include "UpdateData.h"
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "Creature.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "CellImpl.h"
|
||||
#include "CombatPackets.h"
|
||||
#include "Common.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "CreatureAISelector.h"
|
||||
@@ -27,29 +28,29 @@
|
||||
#include "Formulas.h"
|
||||
#include "GameEventMgr.h"
|
||||
#include "GossipDef.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Group.h"
|
||||
#include "GroupMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Log.h"
|
||||
#include "LootMgr.h"
|
||||
#include "MiscPackets.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "PoolMgr.h"
|
||||
#include "QuestDef.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "Transport.h"
|
||||
#include "Util.h"
|
||||
#include "Vehicle.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "CombatPackets.h"
|
||||
#include "MiscPackets.h"
|
||||
|
||||
#include "Transport.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include <G3D/g3dmath.h>
|
||||
|
||||
TrainerSpell const* TrainerSpellData::Find(uint32 spell_id) const
|
||||
{
|
||||
@@ -60,27 +61,27 @@ TrainerSpell const* TrainerSpellData::Find(uint32 spell_id) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool VendorItem::IsGoldRequired(ItemTemplate const* pProto) const
|
||||
{
|
||||
return pProto->GetFlags2() & ITEM_FLAG2_DONT_IGNORE_BUY_PRICE || !ExtendedCost;
|
||||
}
|
||||
|
||||
bool VendorItemData::RemoveItem(uint32 item_id, uint8 type)
|
||||
{
|
||||
bool found = false;
|
||||
for (VendorItemList::iterator i = m_items.begin(); i != m_items.end();)
|
||||
auto newEnd = std::remove_if(m_items.begin(), m_items.end(), [=](VendorItem const& vendorItem)
|
||||
{
|
||||
if ((*i)->item == item_id && (*i)->Type == type)
|
||||
{
|
||||
i = m_items.erase(i++);
|
||||
found = true;
|
||||
}
|
||||
else
|
||||
++i;
|
||||
}
|
||||
return vendorItem.item == item_id && vendorItem.Type == type;
|
||||
});
|
||||
bool found = newEnd != m_items.end();
|
||||
m_items.erase(newEnd, m_items.end());
|
||||
return found;
|
||||
}
|
||||
|
||||
VendorItem const* VendorItemData::FindItemCostPair(uint32 item_id, uint32 extendedCost, uint8 type) const
|
||||
{
|
||||
for (VendorItemList::const_iterator i = m_items.begin(); i != m_items.end(); ++i)
|
||||
if ((*i)->item == item_id && (*i)->ExtendedCost == extendedCost && (*i)->Type == type)
|
||||
return *i;
|
||||
for (VendorItem const& vendorItem : m_items)
|
||||
if (vendorItem.item == item_id && vendorItem.ExtendedCost == extendedCost && vendorItem.Type == type)
|
||||
return &vendorItem;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
#ifndef TRINITYCORE_CREATURE_H
|
||||
#define TRINITYCORE_CREATURE_H
|
||||
|
||||
#include "Common.h"
|
||||
#include "Duration.h"
|
||||
#include "Unit.h"
|
||||
#include "ItemTemplate.h"
|
||||
#include "Loot.h"
|
||||
#include "Common.h"
|
||||
#include "CreatureData.h"
|
||||
#include "DatabaseEnvFwd.h"
|
||||
#include "Duration.h"
|
||||
#include "Loot.h"
|
||||
#include "MapObject.h"
|
||||
|
||||
#include <list>
|
||||
@@ -36,598 +36,11 @@ class Quest;
|
||||
class Player;
|
||||
class SpellInfo;
|
||||
class WorldSession;
|
||||
|
||||
enum CreatureDifficultyFlags
|
||||
{
|
||||
CREATURE_DIFFICULTYFLAGS_UNK1 = 0x00000001, // Related to mounts
|
||||
CREATURE_DIFFICULTYFLAGS_NO_EXPERIENCE = 0x00000002,
|
||||
CREATURE_DIFFICULTYFLAGS_NO_LOOT = 0x00000004,
|
||||
CREATURE_DIFFICULTYFLAGS_UNKILLABLE = 0x00000008,
|
||||
CREATURE_DIFFICULTYFLAGS_TAMEABLE = 0x00000010, // CREATURE_TYPEFLAGS_TAMEABLE
|
||||
CREATURE_DIFFICULTYFLAGS_IMMUNE_TO_PC = 0x00000020, // UNIT_FLAG_IMMUNE_TO_PC
|
||||
CREATURE_DIFFICULTYFLAGS_IMMUNE_TO_NPC = 0x00000040, // UNIT_FLAG_IMMUNE_TO_NPC
|
||||
CREATURE_DIFFICULTYFLAGS_UNK2 = 0x00000080,
|
||||
CREATURE_DIFFICULTYFLAGS_SESSILE = 0x00000100, // Creature is rooted
|
||||
CREATURE_DIFFICULTYFLAGS_NOT_SELECTABLE = 0x00000200, // UNIT_FLAG_NOT_SELECTABLE
|
||||
CREATURE_DIFFICULTYFLAGS_UNK3 = 0x00000400, // Related to health - it seems similar to CREATURE_DIFFICULTYFLAGS_2_KEEP_HEALTH_POINTS_AT_RESET
|
||||
CREATURE_DIFFICULTYFLAGS_NO_CORPSE_UPON_DEATH = 0x00000800, // Creature instantly disappear when killed
|
||||
CREATURE_DIFFICULTYFLAGS_UNK5 = 0x00001000,
|
||||
CREATURE_DIFFICULTYFLAGS_UNK6 = 0x00002000,
|
||||
CREATURE_DIFFICULTYFLAGS_UNK7 = 0x00004000,
|
||||
CREATURE_DIFFICULTYFLAGS_UNK8 = 0x00008000,
|
||||
CREATURE_DIFFICULTYFLAGS_BOSS = 0x00010000, // CREATURE_TYPEFLAGS_BOSS
|
||||
CREATURE_DIFFICULTYFLAGS_UNK9 = 0x00020000,
|
||||
CREATURE_DIFFICULTYFLAGS_WATER_BOUND = 0x00040000,
|
||||
CREATURE_DIFFICULTYFLAGS_CAN_PENETRATE_WATER = 0x00080000,
|
||||
CREATURE_DIFFICULTYFLAGS_UNK10 = 0x00100000,
|
||||
CREATURE_DIFFICULTYFLAGS_GHOST = 0x00200000, // CREATURE_TYPEFLAGS_GHOST
|
||||
CREATURE_DIFFICULTYFLAGS_UNK11 = 0x00400000,
|
||||
CREATURE_DIFFICULTYFLAGS_DO_NOT_PLAY_WOUND_PARRY_ANIMATION = 0x00800000, // CREATURE_TYPEFLAGS_DO_NOT_PLAY_WOUND_PARRY_ANIMATION
|
||||
CREATURE_DIFFICULTYFLAGS_HIDE_FACTION_TOOLTIP = 0x01000000, // CREATURE_TYPEFLAGS_HIDE_FACTION_TOOLTIP
|
||||
CREATURE_DIFFICULTYFLAGS_IGNORE_COMBAT = 0x02000000,
|
||||
CREATURE_DIFFICULTYFLAGS_UNK12 = 0x04000000,
|
||||
CREATURE_DIFFICULTYFLAGS_SUMMON_GUARD_IF_IN_AGGRO_RANGE = 0x08000000, // Creature will summon a guard if player is within its aggro range (even if creature doesn't attack per se)
|
||||
CREATURE_DIFFICULTYFLAGS_ONLY_SWIM = 0x10000000, // UNIT_FLAG_UNK_15
|
||||
CREATURE_DIFFICULTYFLAGS_UNK13 = 0x20000000, // Related to gravity
|
||||
CREATURE_DIFFICULTYFLAGS_TFLAG_UNK5 = 0x40000000, // CREATURE_TYPEFLAGS_UNK5
|
||||
CREATURE_DIFFICULTYFLAGS_LARGE_AOI = 0x80000000 // UnitFlags2 0x200000
|
||||
};
|
||||
|
||||
enum CreatureDifficultyFlags2
|
||||
{
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK1 = 0x00000001,
|
||||
CREATURE_DIFFICULTYFLAGS_2_FORCE_PARTY_MEMBERS_INTO_COMBAT = 0x00000002,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK2 = 0x00000004,
|
||||
CREATURE_DIFFICULTYFLAGS_2_SPELL_ATTACKABLE = 0x00000008, // CREATURE_TYPEFLAGS_SPELL_ATTACKABLE
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK3 = 0x00000010,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK4 = 0x00000020,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK5 = 0x00000040,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK6 = 0x00000080,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK7 = 0x00000100,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK8 = 0x00000200,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK9 = 0x00000400,
|
||||
CREATURE_DIFFICULTYFLAGS_2_DEAD_INTERACT = 0x00000800, // CREATURE_TYPEFLAGS_DEAD_INTERACT
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK10 = 0x00001000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK11 = 0x00002000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_HERBLOOT = 0x00004000, // CREATURE_TYPEFLAGS_HERBLOOT
|
||||
CREATURE_DIFFICULTYFLAGS_2_MININGLOOT = 0x00008000, // CREATURE_TYPEFLAGS_MININGLOOT
|
||||
CREATURE_DIFFICULTYFLAGS_2_DONT_LOG_DEATH = 0x00010000, // CREATURE_TYPEFLAGS_DONT_LOG_DEATH
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK12 = 0x00020000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_MOUNTED_COMBAT = 0x00040000, // CREATURE_TYPEFLAGS_MOUNTED_COMBAT
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK13 = 0x00080000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK14 = 0x00100000, // This flag seems similar to CREATURE_DIFFICULTYFLAGS_IGNORE_COMBAT
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK15 = 0x00200000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK16 = 0x00400000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK17 = 0x00800000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK18 = 0x01000000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_HIDE_BODY = 0x02000000, // UNIT_FLAG2_UNK1
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK19 = 0x04000000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_SERVER_ONLY = 0x08000000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_CAN_SAFE_FALL = 0x10000000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_CAN_ASSIST = 0x20000000, // CREATURE_TYPEFLAGS_CAN_ASSIST
|
||||
CREATURE_DIFFICULTYFLAGS_2_KEEP_HEALTH_POINTS_AT_RESET = 0x40000000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_IS_PET_BAR_USED = 0x80000000 // CREATURE_TYPEFLAGS_IS_PET_BAR_USED
|
||||
};
|
||||
|
||||
enum CreatureDifficultyFlags3
|
||||
{
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK1 = 0x00000001,
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK2 = 0x00000002,
|
||||
CREATURE_DIFFICULTYFLAGS_3_INSTANTLY_APPEAR_MODEL = 0x00000004, // UNIT_FLAG2_INSTANTLY_APPEAR_MODEL
|
||||
CREATURE_DIFFICULTYFLAGS_3_MASK_UID = 0x00000008, // CREATURE_TYPEFLAG_MASK_UID
|
||||
CREATURE_DIFFICULTYFLAGS_3_ENGINEERLOOT = 0x00000010, // CREATURE_TYPEFLAGS_ENGINEERLOOT
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK3 = 0x00000020,
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK4 = 0x00000040,
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK5 = 0x00000080,
|
||||
CREATURE_DIFFICULTYFLAGS_3_CANNOT_SWIM = 0x00000100, // UNIT_FLAG_UNK_14
|
||||
CREATURE_DIFFICULTYFLAGS_3_EXOTIC = 0x00000200, // CREATURE_TYPEFLAGS_EXOTIC
|
||||
CREATURE_DIFFICULTYFLAGS_3_GIGANTIC_AOI = 0x00000400, // Since MoP, creatures with that flag have UnitFlags2 0x400000
|
||||
CREATURE_DIFFICULTYFLAGS_3_INFINITE_AOI = 0x00000800, // Since MoP, creatures with that flag have UnitFlags2 0x40000000
|
||||
CREATURE_DIFFICULTYFLAGS_3_WATERWALKING = 0x00001000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_HIDE_NAMEPLATE = 0x00002000, // CREATURE_TYPEFLAGS_HIDE_NAMEPLATE
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK6 = 0x00004000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK7 = 0x00008000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_USE_DEFAULT_COLLISION_BOX = 0x00010000, // CREATURE_TYPEFLAGS_USE_DEFAULT_COLLISION_BOX
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK8 = 0x00020000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_IS_SIEGE_WEAPON = 0x00040000, // CREATURE_TYPEFLAGS_IS_SIEGE_WEAPON
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK9 = 0x00080000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK10 = 0x00100000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK11 = 0x00200000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_PROJECTILE_COLLISION = 0x00400000, // CREATURE_TYPEFLAGS_PROJECTILE_COLLISION
|
||||
CREATURE_DIFFICULTYFLAGS_3_CAN_BE_MULTITAPPED = 0x00800000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_DO_NOT_PLAY_MOUNTED_ANIMATIONS = 0x01000000, // CREATURE_TYPEFLAGS_DO_NOT_PLAY_MOUNTED_ANIMATIONS
|
||||
CREATURE_DIFFICULTYFLAGS_3_DISABLE_TURN = 0x02000000, // UNIT_FLAG2_DISABLE_TURN
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK12 = 0x04000000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK13 = 0x08000000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK14 = 0x10000000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_IS_LINK_ALL = 0x20000000, // CREATURE_TYPEFLAGS_IS_LINK_ALL
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK15 = 0x40000000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK16 = 0x80000000
|
||||
};
|
||||
|
||||
enum CreatureDifficultyFlags4
|
||||
{
|
||||
CREATURE_DIFFICULTYFLAGS_4_HAS_NO_BIRTH_ANIMATION = 0x00000001, // SMSG_UPDATE_OBJECT's "NoBirthAnim"
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK1 = 0x00000002,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK2 = 0x00000004,
|
||||
CREATURE_DIFFICULTYFLAGS_4_INTERACT_ONLY_WITH_CREATOR = 0x00000008, // CREATURE_TYPEFLAGS_INTERACT_ONLY_WITH_CREATOR
|
||||
CREATURE_DIFFICULTYFLAGS_4_DO_NOT_PLAY_UNIT_EVENT_SOUNDS = 0x00000010, // CREATURE_TYPEFLAGS_DO_NOT_PLAY_UNIT_EVENT_SOUNDS
|
||||
CREATURE_DIFFICULTYFLAGS_4_HAS_NO_SHADOW_BLOB = 0x00000020, // CREATURE_TYPEFLAGS_HAS_NO_SHADOW_BLOB
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK3 = 0x00000040,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK4 = 0x00000080,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK5 = 0x00000100,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK6 = 0x00000200,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK7 = 0x00000400,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK8 = 0x00000800,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK9 = 0x00001000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK10 = 0x00002000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK11 = 0x00004000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UFLAG2_UNK20 = 0x00008000, // UnitFlags2 0x100000
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK12 = 0x00010000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK13 = 0x00020000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK14 = 0x00040000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_FORCE_GOSSIP = 0x00080000, // CREATURE_TYPEFLAGS_FORCE_GOSSIP
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK15 = 0x00100000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_DO_NOT_SHEATHE = 0x00200000, // CREATURE_TYPEFLAGS_DO_NOT_SHEATHE
|
||||
CREATURE_DIFFICULTYFLAGS_4_IGNORE_SPELL_MIN_RANGE_RESTRICTIONS = 0x00400000, // UnitFlags2 0x8000000
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK16 = 0x00800000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_PREVENT_SWIM = 0x01000000, // UnitFlags2 0x1000000
|
||||
CREATURE_DIFFICULTYFLAGS_4_HIDE_IN_COMBAT_LOG = 0x02000000, // UnitFlags2 0x2000000
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK17 = 0x04000000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK18 = 0x08000000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK19 = 0x10000000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_DO_NOT_TARGET_ON_INTERACTION = 0x20000000, // CREATURE_TYPEFLAGS_DO_NOT_TARGET_ON_INTERACTION
|
||||
CREATURE_DIFFICULTYFLAGS_4_DO_NOT_RENDER_OBJECT_NAME = 0x40000000, // CREATURE_TYPEFLAGS_DO_NOT_RENDER_OBJECT_NAME
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNIT_IS_QUEST_BOSS = 0x80000000 // CREATURE_TYPEFLAGS_UNIT_IS_QUEST_BOSS
|
||||
};
|
||||
|
||||
enum CreatureDifficultyFlags5
|
||||
{
|
||||
CREATURE_DIFFICULTYFLAGS_5_CANNOT_SWITCH_TARGETS = 0x00000001, // UnitFlags2 0x4000000
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK1 = 0x00000002,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UFLAG2_UNK30 = 0x00000004, // UnitFlags2 0x10000000
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK2 = 0x00000008,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK3 = 0x00000010,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK4 = 0x00000020,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK5 = 0x00000040,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK6 = 0x00000080,
|
||||
CREATURE_DIFFICULTYFLAGS_5_CAN_INTERACT_EVEN_IF_HOSTILE = 0x00000100, // UNIT_FLAG2_ALLOW_ENEMY_INTERACT
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK7 = 0x00000200,
|
||||
CREATURE_DIFFICULTYFLAGS_5_TFLAG2_UNK1 = 0x00000400, // CREATURE_TYPEFLAGS_2_UNK1
|
||||
CREATURE_DIFFICULTYFLAGS_5_TFLAG2_UNK2 = 0x00000800, // CREATURE_TYPEFLAGS_2_UNK2
|
||||
CREATURE_DIFFICULTYFLAGS_5_TFLAG2_UNK3 = 0x00001000, // CREATURE_TYPEFLAGS_2_UNK3
|
||||
CREATURE_DIFFICULTYFLAGS_5_UFLAG2_UNK19 = 0x00002000, // UnitFlags2 0x80000
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK8 = 0x00004000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK9 = 0x00008000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK10 = 0x00010000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK11 = 0x00020000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK12 = 0x00040000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK13 = 0x00080000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_TFLAG2_UNK4 = 0x00100000, // CREATURE_TYPEFLAGS_2_UNK4
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK14 = 0x00200000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK15 = 0x00400000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_TFLAG2_UNK5 = 0x00800000, // CREATURE_TYPEFLAGS_2_UNK5
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK16 = 0x01000000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK17 = 0x02000000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK18 = 0x04000000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK19 = 0x08000000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK20 = 0x10000000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK21 = 0x20000000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_TFLAG2_UNK6 = 0x40000000, // CREATURE_TYPEFLAGS_2_UNK6
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK22 = 0x80000000
|
||||
};
|
||||
|
||||
enum CreatureDifficultyFlags6
|
||||
{
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK1 = 0x00000001,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK2 = 0x00000002,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK3 = 0x00000004,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK4 = 0x00000008,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK5 = 0x00000010,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK6 = 0x00000020,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK7 = 0x00000040,
|
||||
CREATURE_DIFFICULTYFLAGS_6_TFLAG2_UNK7 = 0x00000080,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK8 = 0x00000100,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK9 = 0x00000200,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK10 = 0x00000400,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK11 = 0x00000800,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK12 = 0x00001000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK13 = 0x00002000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK14 = 0x00004000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK15 = 0x00008000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK16 = 0x00010000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK17 = 0x00020000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK18 = 0x00040000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK19 = 0x00080000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK20 = 0x00100000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK21 = 0x00200000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK22 = 0x00400000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK23 = 0x00800000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK24 = 0x01000000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK25 = 0x02000000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK26 = 0x04000000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK27 = 0x08000000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK28 = 0x10000000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK29 = 0x20000000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK30 = 0x40000000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_TFLAG2_UNK14 = 0x80000000
|
||||
};
|
||||
|
||||
enum CreatureDifficultyFlags7
|
||||
{
|
||||
CREATURE_DIFFICULTYFLAGS_7_TFLAG2_UNK15 = 0x00000001,
|
||||
CREATURE_DIFFICULTYFLAGS_7_TFLAG2_UNK16 = 0x00000002,
|
||||
CREATURE_DIFFICULTYFLAGS_7_TFLAG2_UNK17 = 0x00000004,
|
||||
CREATURE_DIFFICULTYFLAGS_7_UNK1 = 0x00000008
|
||||
};
|
||||
|
||||
enum CreatureFlagsExtra
|
||||
{
|
||||
CREATURE_FLAG_EXTRA_INSTANCE_BIND = 0x00000001, // creature kill bind instance with killer and killer's group
|
||||
CREATURE_FLAG_EXTRA_CIVILIAN = 0x00000002, // not aggro (ignore faction/reputation hostility)
|
||||
CREATURE_FLAG_EXTRA_NO_PARRY = 0x00000004, // creature can't parry
|
||||
CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN = 0x00000008, // creature can't counter-attack at parry
|
||||
CREATURE_FLAG_EXTRA_NO_BLOCK = 0x00000010, // creature can't block
|
||||
CREATURE_FLAG_EXTRA_NO_CRUSH = 0x00000020, // creature can't do crush attacks
|
||||
CREATURE_FLAG_EXTRA_NO_XP_AT_KILL = 0x00000040, // creature kill not provide XP
|
||||
CREATURE_FLAG_EXTRA_TRIGGER = 0x00000080, // trigger creature
|
||||
CREATURE_FLAG_EXTRA_NO_TAUNT = 0x00000100, // creature is immune to taunt auras and effect attack me
|
||||
CREATURE_FLAG_EXTRA_WORLDEVENT = 0x00004000, // custom flag for world event creatures (left room for merging)
|
||||
CREATURE_FLAG_EXTRA_GUARD = 0x00008000, // Creature is guard
|
||||
CREATURE_FLAG_EXTRA_NO_CRIT = 0x00020000, // creature can't do critical strikes
|
||||
CREATURE_FLAG_EXTRA_NO_SKILLGAIN = 0x00040000, // creature won't increase weapon skills
|
||||
CREATURE_FLAG_EXTRA_TAUNT_DIMINISH = 0x00080000, // Taunt is a subject to diminishing returns on this creautre
|
||||
CREATURE_FLAG_EXTRA_ALL_DIMINISH = 0x00100000, // creature is subject to all diminishing returns as player are
|
||||
CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ = 0x00200000, // creature does not need to take player damage for kill credit
|
||||
CREATURE_FLAG_EXTRA_DUNGEON_BOSS = 0x10000000, // creature is a dungeon boss (SET DYNAMICALLY, DO NOT ADD IN DB)
|
||||
CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING = 0x20000000, // creature ignore pathfinding
|
||||
CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK = 0x40000000 // creature is immune to knockback effects
|
||||
};
|
||||
|
||||
#define CREATURE_FLAG_EXTRA_DB_ALLOWED (CREATURE_FLAG_EXTRA_INSTANCE_BIND | CREATURE_FLAG_EXTRA_CIVILIAN | \
|
||||
CREATURE_FLAG_EXTRA_NO_PARRY | CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN | CREATURE_FLAG_EXTRA_NO_BLOCK | \
|
||||
CREATURE_FLAG_EXTRA_NO_CRUSH | CREATURE_FLAG_EXTRA_NO_XP_AT_KILL | CREATURE_FLAG_EXTRA_TRIGGER | \
|
||||
CREATURE_FLAG_EXTRA_NO_TAUNT | CREATURE_FLAG_EXTRA_WORLDEVENT | CREATURE_FLAG_EXTRA_NO_CRIT | \
|
||||
CREATURE_FLAG_EXTRA_NO_SKILLGAIN | CREATURE_FLAG_EXTRA_TAUNT_DIMINISH | CREATURE_FLAG_EXTRA_ALL_DIMINISH | \
|
||||
CREATURE_FLAG_EXTRA_GUARD | CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING | CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ | CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK)
|
||||
|
||||
const uint32 CREATURE_REGEN_INTERVAL = 2 * IN_MILLISECONDS;
|
||||
const uint32 CREATURE_NOPATH_EVADE_TIME = 5 * IN_MILLISECONDS;
|
||||
|
||||
const uint8 MAX_KILL_CREDIT = 2;
|
||||
const uint32 MAX_CREATURE_MODELS = 4;
|
||||
const uint32 MAX_CREATURE_NAMES = 4;
|
||||
const uint32 MAX_CREATURE_SPELLS = 8;
|
||||
const uint32 MAX_CREATURE_DIFFICULTIES = 3;
|
||||
|
||||
// from `creature_template` table
|
||||
struct TC_GAME_API CreatureTemplate
|
||||
{
|
||||
uint32 Entry;
|
||||
uint32 DifficultyEntry[MAX_CREATURE_DIFFICULTIES];
|
||||
uint32 KillCredit[MAX_KILL_CREDIT];
|
||||
uint32 Modelid1;
|
||||
uint32 Modelid2;
|
||||
uint32 Modelid3;
|
||||
uint32 Modelid4;
|
||||
std::string Name;
|
||||
std::string FemaleName;
|
||||
std::string SubName;
|
||||
std::string IconName;
|
||||
uint32 GossipMenuId;
|
||||
int16 minlevel;
|
||||
int16 maxlevel;
|
||||
int32 HealthScalingExpansion;
|
||||
uint32 RequiredExpansion;
|
||||
uint32 VignetteID; /// @todo Read Vignette.db2
|
||||
uint32 faction;
|
||||
uint64 npcflag;
|
||||
float speed_walk;
|
||||
float speed_run;
|
||||
float scale;
|
||||
uint32 rank;
|
||||
uint32 dmgschool;
|
||||
uint32 BaseAttackTime;
|
||||
uint32 RangeAttackTime;
|
||||
float BaseVariance;
|
||||
float RangeVariance;
|
||||
uint32 unit_class; // enum Classes. Note only 4 classes are known for creatures.
|
||||
uint32 unit_flags; // enum UnitFlags mask values
|
||||
uint32 unit_flags2; // enum UnitFlags2 mask values
|
||||
uint32 unit_flags3; // enum UnitFlags3 mask values
|
||||
uint32 dynamicflags;
|
||||
CreatureFamily family; // enum CreatureFamily values (optional)
|
||||
uint32 trainer_type;
|
||||
uint32 trainer_class;
|
||||
uint32 trainer_race;
|
||||
uint32 type; // enum CreatureType values
|
||||
uint32 type_flags; // enum CreatureTypeFlags mask values
|
||||
uint32 type_flags2; // unknown enum, only set for 4 creatures (with value 1)
|
||||
uint32 lootid;
|
||||
uint32 pickpocketLootId;
|
||||
uint32 SkinLootId;
|
||||
int32 resistance[MAX_SPELL_SCHOOL];
|
||||
uint32 spells[MAX_CREATURE_SPELLS];
|
||||
uint32 VehicleId;
|
||||
uint32 mingold;
|
||||
uint32 maxgold;
|
||||
std::string AIName;
|
||||
uint32 MovementType;
|
||||
uint32 InhabitType;
|
||||
float HoverHeight;
|
||||
float ModHealth;
|
||||
float ModHealthExtra;
|
||||
float ModMana;
|
||||
float ModManaExtra; // Added in 4.x, this value is usually 2 for a small group of creatures with double mana
|
||||
float ModArmor;
|
||||
float ModDamage;
|
||||
float ModExperience;
|
||||
bool RacialLeader;
|
||||
uint32 movementId;
|
||||
bool RegenHealth;
|
||||
uint32 MechanicImmuneMask;
|
||||
uint32 flags_extra;
|
||||
uint32 ScriptID;
|
||||
uint32 GetRandomValidModelId() const;
|
||||
uint32 GetFirstValidModelId() const;
|
||||
uint32 GetFirstInvisibleModel() const;
|
||||
uint32 GetFirstVisibleModel() const;
|
||||
|
||||
// helpers
|
||||
SkillType GetRequiredLootSkill() const
|
||||
{
|
||||
if (type_flags & CREATURE_TYPE_FLAG_HERB_SKINNING_SKILL)
|
||||
return SKILL_HERBALISM;
|
||||
else if (type_flags & CREATURE_TYPE_FLAG_MINING_SKINNING_SKILL)
|
||||
return SKILL_MINING;
|
||||
else if (type_flags & CREATURE_TYPE_FLAG_ENGINEERING_SKINNING_SKILL)
|
||||
return SKILL_ENGINEERING;
|
||||
else
|
||||
return SKILL_SKINNING; // normal case
|
||||
}
|
||||
|
||||
bool IsExotic() const
|
||||
{
|
||||
return (type_flags & CREATURE_TYPE_FLAG_EXOTIC_PET) != 0;
|
||||
}
|
||||
|
||||
bool IsTameable(bool canTameExotic) const
|
||||
{
|
||||
if (type != CREATURE_TYPE_BEAST || family == CREATURE_FAMILY_NONE || (type_flags & CREATURE_TYPE_FLAG_TAMEABLE_PET) == 0)
|
||||
return false;
|
||||
|
||||
// if can tame exotic then can tame any tameable
|
||||
return canTameExotic || !IsExotic();
|
||||
}
|
||||
|
||||
static int32 DifficultyIDToDifficultyEntryIndex(uint32 difficulty)
|
||||
{
|
||||
switch (difficulty)
|
||||
{
|
||||
case DIFFICULTY_NONE:
|
||||
case DIFFICULTY_NORMAL:
|
||||
case DIFFICULTY_10_N:
|
||||
case DIFFICULTY_40:
|
||||
case DIFFICULTY_3_MAN_SCENARIO_N:
|
||||
case DIFFICULTY_NORMAL_RAID:
|
||||
return -1;
|
||||
case DIFFICULTY_HEROIC:
|
||||
case DIFFICULTY_25_N:
|
||||
case DIFFICULTY_3_MAN_SCENARIO_HC:
|
||||
case DIFFICULTY_HEROIC_RAID:
|
||||
return 0;
|
||||
case DIFFICULTY_10_HC:
|
||||
case DIFFICULTY_MYTHIC_KEYSTONE:
|
||||
case DIFFICULTY_MYTHIC_RAID:
|
||||
return 1;
|
||||
case DIFFICULTY_25_HC:
|
||||
return 2;
|
||||
case DIFFICULTY_LFR:
|
||||
case DIFFICULTY_LFR_NEW:
|
||||
case DIFFICULTY_EVENT_RAID:
|
||||
case DIFFICULTY_EVENT_DUNGEON:
|
||||
case DIFFICULTY_EVENT_SCENARIO:
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
typedef std::vector<uint32> CreatureQuestItemList;
|
||||
typedef std::unordered_map<uint32, CreatureQuestItemList> CreatureQuestItemMap;
|
||||
|
||||
// Benchmarked: Faster than std::map (insert/find)
|
||||
typedef std::unordered_map<uint32, CreatureTemplate> CreatureTemplateContainer;
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
// Defines base stats for creatures (used to calculate HP/mana/armor/attackpower/rangedattackpower/all damage).
|
||||
struct TC_GAME_API CreatureBaseStats
|
||||
{
|
||||
uint32 BaseHealth[MAX_EXPANSIONS];
|
||||
uint32 BaseMana;
|
||||
uint32 BaseArmor;
|
||||
uint32 AttackPower;
|
||||
uint32 RangedAttackPower;
|
||||
float BaseDamage[MAX_EXPANSIONS];
|
||||
|
||||
// Helpers
|
||||
|
||||
uint32 GenerateHealth(CreatureTemplate const* info) const
|
||||
{
|
||||
return uint32(ceil(BaseHealth[info->HealthScalingExpansion] * info->ModHealth * info->ModHealthExtra));
|
||||
}
|
||||
|
||||
uint32 GenerateMana(CreatureTemplate const* info) const
|
||||
{
|
||||
// Mana can be 0.
|
||||
if (!BaseMana)
|
||||
return 0;
|
||||
|
||||
return uint32(ceil(BaseMana * info->ModMana * info->ModManaExtra));
|
||||
}
|
||||
|
||||
uint32 GenerateArmor(CreatureTemplate const* info) const
|
||||
{
|
||||
return uint32(ceil(BaseArmor * info->ModArmor));
|
||||
}
|
||||
|
||||
float GenerateBaseDamage(CreatureTemplate const* info) const
|
||||
{
|
||||
return BaseDamage[info->HealthScalingExpansion];
|
||||
}
|
||||
|
||||
static CreatureBaseStats const* GetBaseStats(uint8 level, uint8 unitClass);
|
||||
};
|
||||
|
||||
typedef std::unordered_map<uint16, CreatureBaseStats> CreatureBaseStatsContainer;
|
||||
|
||||
struct CreatureLocale
|
||||
{
|
||||
std::vector<std::string> Name;
|
||||
std::vector<std::string> NameAlt;
|
||||
std::vector<std::string> Title;
|
||||
std::vector<std::string> TitleAlt;
|
||||
};
|
||||
|
||||
struct EquipmentItem
|
||||
{
|
||||
uint32 ItemId = 0;
|
||||
uint16 AppearanceModId = 0;
|
||||
uint16 ItemVisual = 0;
|
||||
};
|
||||
|
||||
struct EquipmentInfo
|
||||
{
|
||||
EquipmentItem Items[MAX_EQUIPMENT_ITEMS];
|
||||
};
|
||||
|
||||
// Benchmarked: Faster than std::map (insert/find)
|
||||
typedef std::unordered_map<uint8, EquipmentInfo> EquipmentInfoContainerInternal;
|
||||
typedef std::unordered_map<uint32, EquipmentInfoContainerInternal> EquipmentInfoContainer;
|
||||
|
||||
// from `creature` table
|
||||
struct CreatureData
|
||||
{
|
||||
CreatureData() : id(0), mapid(0), phaseMask(0), displayid(0), equipmentId(0),
|
||||
posX(0.0f), posY(0.0f), posZ(0.0f), orientation(0.0f), spawntimesecs(0),
|
||||
spawndist(0.0f), currentwaypoint(0), curhealth(0), curmana(0), movementType(0),
|
||||
spawnMask(0), npcflag(0), unit_flags(0), unit_flags2(0), unit_flags3(0), dynamicflags(0),
|
||||
phaseid(0), phaseGroup(0), dbData(true) { }
|
||||
uint32 id; // entry in creature_template
|
||||
uint16 mapid;
|
||||
uint32 phaseMask;
|
||||
uint32 displayid;
|
||||
int8 equipmentId;
|
||||
float posX;
|
||||
float posY;
|
||||
float posZ;
|
||||
float orientation;
|
||||
uint32 spawntimesecs;
|
||||
float spawndist;
|
||||
uint32 currentwaypoint;
|
||||
uint32 curhealth;
|
||||
uint32 curmana;
|
||||
uint8 movementType;
|
||||
uint32 spawnMask;
|
||||
uint64 npcflag;
|
||||
uint32 unit_flags; // enum UnitFlags mask values
|
||||
uint32 unit_flags2; // enum UnitFlags2 mask values
|
||||
uint32 unit_flags3; // enum UnitFlags3 mask values
|
||||
uint32 dynamicflags;
|
||||
uint32 phaseid;
|
||||
uint32 phaseGroup;
|
||||
uint32 ScriptId;
|
||||
bool dbData;
|
||||
};
|
||||
|
||||
struct CreatureModelInfo
|
||||
{
|
||||
float bounding_radius;
|
||||
float combat_reach;
|
||||
int8 gender;
|
||||
uint32 displayId_other_gender;
|
||||
bool is_trigger;
|
||||
};
|
||||
|
||||
// Benchmarked: Faster than std::map (insert/find)
|
||||
typedef std::unordered_map<uint32, CreatureModelInfo> CreatureModelContainer;
|
||||
|
||||
enum InhabitTypeValues
|
||||
{
|
||||
INHABIT_GROUND = 1,
|
||||
INHABIT_WATER = 2,
|
||||
INHABIT_AIR = 4,
|
||||
INHABIT_ROOT = 8,
|
||||
INHABIT_ANYWHERE = INHABIT_GROUND | INHABIT_WATER | INHABIT_AIR | INHABIT_ROOT
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
// `creature_addon` table
|
||||
struct CreatureAddon
|
||||
{
|
||||
uint32 path_id;
|
||||
uint32 mount;
|
||||
uint32 bytes1;
|
||||
uint32 bytes2;
|
||||
uint32 emote;
|
||||
uint16 aiAnimKit;
|
||||
uint16 movementAnimKit;
|
||||
uint16 meleeAnimKit;
|
||||
std::vector<uint32> auras;
|
||||
};
|
||||
|
||||
typedef std::unordered_map<ObjectGuid::LowType, CreatureAddon> CreatureAddonContainer;
|
||||
typedef std::unordered_map<uint32, CreatureAddon> CreatureTemplateAddonContainer;
|
||||
|
||||
// Vendors
|
||||
struct VendorItem
|
||||
{
|
||||
VendorItem(uint32 _item, int32 _maxcount, uint32 _incrtime, uint32 _ExtendedCost, uint8 _Type)
|
||||
: item(_item), maxcount(_maxcount), incrtime(_incrtime), ExtendedCost(_ExtendedCost), Type(_Type) { }
|
||||
|
||||
uint32 item;
|
||||
uint32 maxcount; // 0 for infinity item amount
|
||||
uint32 incrtime; // time for restore items amount if maxcount != 0
|
||||
uint32 ExtendedCost;
|
||||
uint8 Type;
|
||||
|
||||
//helpers
|
||||
bool IsGoldRequired(ItemTemplate const* pProto) const { return pProto->GetFlags2() & ITEM_FLAG2_DONT_IGNORE_BUY_PRICE || !ExtendedCost; }
|
||||
};
|
||||
typedef std::vector<VendorItem*> VendorItemList;
|
||||
|
||||
struct VendorItemData
|
||||
{
|
||||
VendorItemList m_items;
|
||||
|
||||
VendorItem* GetItem(uint32 slot) const
|
||||
{
|
||||
if (slot >= m_items.size())
|
||||
return NULL;
|
||||
|
||||
return m_items[slot];
|
||||
}
|
||||
bool Empty() const { return m_items.empty(); }
|
||||
uint32 GetItemCount() const { return uint32(m_items.size()); }
|
||||
void AddItem(uint32 item, int32 maxcount, uint32 ptime, uint32 ExtendedCost, uint8 type)
|
||||
{
|
||||
m_items.push_back(new VendorItem(item, maxcount, ptime, ExtendedCost, type));
|
||||
}
|
||||
bool RemoveItem(uint32 item_id, uint8 type);
|
||||
VendorItem const* FindItemCostPair(uint32 item_id, uint32 extendedCost, uint8 type) const;
|
||||
void Clear()
|
||||
{
|
||||
for (VendorItemList::const_iterator itr = m_items.begin(); itr != m_items.end(); ++itr)
|
||||
delete (*itr);
|
||||
m_items.clear();
|
||||
}
|
||||
};
|
||||
enum MovementGeneratorType : uint8;
|
||||
|
||||
struct VendorItemCount
|
||||
{
|
||||
explicit VendorItemCount(uint32 _item, uint32 _count)
|
||||
VendorItemCount(uint32 _item, uint32 _count)
|
||||
: itemId(_item), count(_count), lastIncrementTime(time(NULL)) { }
|
||||
|
||||
uint32 itemId;
|
||||
@@ -637,43 +50,6 @@ struct VendorItemCount
|
||||
|
||||
typedef std::list<VendorItemCount> VendorItemCounts;
|
||||
|
||||
#define MAX_TRAINERSPELL_ABILITY_REQS 3
|
||||
|
||||
struct TrainerSpell
|
||||
{
|
||||
TrainerSpell() : SpellID(0), MoneyCost(0), ReqSkillLine(0), ReqSkillRank(0), ReqLevel(0), Index(0)
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_TRAINERSPELL_ABILITY_REQS; ++i)
|
||||
ReqAbility[i] = 0;
|
||||
}
|
||||
|
||||
uint32 SpellID;
|
||||
uint32 MoneyCost;
|
||||
uint32 ReqSkillLine;
|
||||
uint32 ReqSkillRank;
|
||||
uint32 ReqLevel;
|
||||
uint32 ReqAbility[MAX_TRAINERSPELL_ABILITY_REQS];
|
||||
uint32 Index;
|
||||
|
||||
// helpers
|
||||
bool IsCastable() const { return ReqAbility[0] != SpellID; }
|
||||
};
|
||||
|
||||
typedef std::unordered_map<uint32 /*spellid*/, TrainerSpell> TrainerSpellMap;
|
||||
|
||||
struct TC_GAME_API TrainerSpellData
|
||||
{
|
||||
TrainerSpellData() : trainerType(0) { }
|
||||
~TrainerSpellData() { spellList.clear(); }
|
||||
|
||||
TrainerSpellMap spellList;
|
||||
uint32 trainerType; // trainer type based at trainer spells, can be different from creature_template value.
|
||||
// req. for correct show non-prof. trainers like weaponmaster, allowed values 0 and 2.
|
||||
TrainerSpell const* Find(uint32 spell_id) const;
|
||||
};
|
||||
|
||||
typedef std::map<uint32, time_t> CreatureSpellCooldowns;
|
||||
|
||||
// max different by z coordinate for creature aggro reaction
|
||||
#define CREATURE_Z_ATTACK_RANGE 3
|
||||
|
||||
|
||||
@@ -0,0 +1,633 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2017 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 CreatureData_h__
|
||||
#define CreatureData_h__
|
||||
|
||||
#include "DBCEnums.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "UnitDefines.h"
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
|
||||
struct ItemTemplate;
|
||||
|
||||
enum CreatureDifficultyFlags
|
||||
{
|
||||
CREATURE_DIFFICULTYFLAGS_UNK1 = 0x00000001, // Related to mounts
|
||||
CREATURE_DIFFICULTYFLAGS_NO_EXPERIENCE = 0x00000002,
|
||||
CREATURE_DIFFICULTYFLAGS_NO_LOOT = 0x00000004,
|
||||
CREATURE_DIFFICULTYFLAGS_UNKILLABLE = 0x00000008,
|
||||
CREATURE_DIFFICULTYFLAGS_TAMEABLE = 0x00000010, // CREATURE_TYPEFLAGS_TAMEABLE
|
||||
CREATURE_DIFFICULTYFLAGS_IMMUNE_TO_PC = 0x00000020, // UNIT_FLAG_IMMUNE_TO_PC
|
||||
CREATURE_DIFFICULTYFLAGS_IMMUNE_TO_NPC = 0x00000040, // UNIT_FLAG_IMMUNE_TO_NPC
|
||||
CREATURE_DIFFICULTYFLAGS_UNK2 = 0x00000080,
|
||||
CREATURE_DIFFICULTYFLAGS_SESSILE = 0x00000100, // Creature is rooted
|
||||
CREATURE_DIFFICULTYFLAGS_NOT_SELECTABLE = 0x00000200, // UNIT_FLAG_NOT_SELECTABLE
|
||||
CREATURE_DIFFICULTYFLAGS_UNK3 = 0x00000400, // Related to health - it seems similar to CREATURE_DIFFICULTYFLAGS_2_KEEP_HEALTH_POINTS_AT_RESET
|
||||
CREATURE_DIFFICULTYFLAGS_NO_CORPSE_UPON_DEATH = 0x00000800, // Creature instantly disappear when killed
|
||||
CREATURE_DIFFICULTYFLAGS_UNK5 = 0x00001000,
|
||||
CREATURE_DIFFICULTYFLAGS_UNK6 = 0x00002000,
|
||||
CREATURE_DIFFICULTYFLAGS_UNK7 = 0x00004000,
|
||||
CREATURE_DIFFICULTYFLAGS_UNK8 = 0x00008000,
|
||||
CREATURE_DIFFICULTYFLAGS_BOSS = 0x00010000, // CREATURE_TYPEFLAGS_BOSS
|
||||
CREATURE_DIFFICULTYFLAGS_UNK9 = 0x00020000,
|
||||
CREATURE_DIFFICULTYFLAGS_WATER_BOUND = 0x00040000,
|
||||
CREATURE_DIFFICULTYFLAGS_CAN_PENETRATE_WATER = 0x00080000,
|
||||
CREATURE_DIFFICULTYFLAGS_UNK10 = 0x00100000,
|
||||
CREATURE_DIFFICULTYFLAGS_GHOST = 0x00200000, // CREATURE_TYPEFLAGS_GHOST
|
||||
CREATURE_DIFFICULTYFLAGS_UNK11 = 0x00400000,
|
||||
CREATURE_DIFFICULTYFLAGS_DO_NOT_PLAY_WOUND_PARRY_ANIMATION = 0x00800000, // CREATURE_TYPEFLAGS_DO_NOT_PLAY_WOUND_PARRY_ANIMATION
|
||||
CREATURE_DIFFICULTYFLAGS_HIDE_FACTION_TOOLTIP = 0x01000000, // CREATURE_TYPEFLAGS_HIDE_FACTION_TOOLTIP
|
||||
CREATURE_DIFFICULTYFLAGS_IGNORE_COMBAT = 0x02000000,
|
||||
CREATURE_DIFFICULTYFLAGS_UNK12 = 0x04000000,
|
||||
CREATURE_DIFFICULTYFLAGS_SUMMON_GUARD_IF_IN_AGGRO_RANGE = 0x08000000, // Creature will summon a guard if player is within its aggro range (even if creature doesn't attack per se)
|
||||
CREATURE_DIFFICULTYFLAGS_ONLY_SWIM = 0x10000000, // UNIT_FLAG_UNK_15
|
||||
CREATURE_DIFFICULTYFLAGS_UNK13 = 0x20000000, // Related to gravity
|
||||
CREATURE_DIFFICULTYFLAGS_TFLAG_UNK5 = 0x40000000, // CREATURE_TYPEFLAGS_UNK5
|
||||
CREATURE_DIFFICULTYFLAGS_LARGE_AOI = 0x80000000 // UnitFlags2 0x200000
|
||||
};
|
||||
|
||||
enum CreatureDifficultyFlags2
|
||||
{
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK1 = 0x00000001,
|
||||
CREATURE_DIFFICULTYFLAGS_2_FORCE_PARTY_MEMBERS_INTO_COMBAT = 0x00000002,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK2 = 0x00000004,
|
||||
CREATURE_DIFFICULTYFLAGS_2_SPELL_ATTACKABLE = 0x00000008, // CREATURE_TYPEFLAGS_SPELL_ATTACKABLE
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK3 = 0x00000010,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK4 = 0x00000020,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK5 = 0x00000040,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK6 = 0x00000080,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK7 = 0x00000100,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK8 = 0x00000200,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK9 = 0x00000400,
|
||||
CREATURE_DIFFICULTYFLAGS_2_DEAD_INTERACT = 0x00000800, // CREATURE_TYPEFLAGS_DEAD_INTERACT
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK10 = 0x00001000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK11 = 0x00002000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_HERBLOOT = 0x00004000, // CREATURE_TYPEFLAGS_HERBLOOT
|
||||
CREATURE_DIFFICULTYFLAGS_2_MININGLOOT = 0x00008000, // CREATURE_TYPEFLAGS_MININGLOOT
|
||||
CREATURE_DIFFICULTYFLAGS_2_DONT_LOG_DEATH = 0x00010000, // CREATURE_TYPEFLAGS_DONT_LOG_DEATH
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK12 = 0x00020000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_MOUNTED_COMBAT = 0x00040000, // CREATURE_TYPEFLAGS_MOUNTED_COMBAT
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK13 = 0x00080000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK14 = 0x00100000, // This flag seems similar to CREATURE_DIFFICULTYFLAGS_IGNORE_COMBAT
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK15 = 0x00200000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK16 = 0x00400000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK17 = 0x00800000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK18 = 0x01000000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_HIDE_BODY = 0x02000000, // UNIT_FLAG2_UNK1
|
||||
CREATURE_DIFFICULTYFLAGS_2_UNK19 = 0x04000000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_SERVER_ONLY = 0x08000000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_CAN_SAFE_FALL = 0x10000000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_CAN_ASSIST = 0x20000000, // CREATURE_TYPEFLAGS_CAN_ASSIST
|
||||
CREATURE_DIFFICULTYFLAGS_2_KEEP_HEALTH_POINTS_AT_RESET = 0x40000000,
|
||||
CREATURE_DIFFICULTYFLAGS_2_IS_PET_BAR_USED = 0x80000000 // CREATURE_TYPEFLAGS_IS_PET_BAR_USED
|
||||
};
|
||||
|
||||
enum CreatureDifficultyFlags3
|
||||
{
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK1 = 0x00000001,
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK2 = 0x00000002,
|
||||
CREATURE_DIFFICULTYFLAGS_3_INSTANTLY_APPEAR_MODEL = 0x00000004, // UNIT_FLAG2_INSTANTLY_APPEAR_MODEL
|
||||
CREATURE_DIFFICULTYFLAGS_3_MASK_UID = 0x00000008, // CREATURE_TYPEFLAG_MASK_UID
|
||||
CREATURE_DIFFICULTYFLAGS_3_ENGINEERLOOT = 0x00000010, // CREATURE_TYPEFLAGS_ENGINEERLOOT
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK3 = 0x00000020,
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK4 = 0x00000040,
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK5 = 0x00000080,
|
||||
CREATURE_DIFFICULTYFLAGS_3_CANNOT_SWIM = 0x00000100, // UNIT_FLAG_UNK_14
|
||||
CREATURE_DIFFICULTYFLAGS_3_EXOTIC = 0x00000200, // CREATURE_TYPEFLAGS_EXOTIC
|
||||
CREATURE_DIFFICULTYFLAGS_3_GIGANTIC_AOI = 0x00000400, // Since MoP, creatures with that flag have UnitFlags2 0x400000
|
||||
CREATURE_DIFFICULTYFLAGS_3_INFINITE_AOI = 0x00000800, // Since MoP, creatures with that flag have UnitFlags2 0x40000000
|
||||
CREATURE_DIFFICULTYFLAGS_3_WATERWALKING = 0x00001000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_HIDE_NAMEPLATE = 0x00002000, // CREATURE_TYPEFLAGS_HIDE_NAMEPLATE
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK6 = 0x00004000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK7 = 0x00008000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_USE_DEFAULT_COLLISION_BOX = 0x00010000, // CREATURE_TYPEFLAGS_USE_DEFAULT_COLLISION_BOX
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK8 = 0x00020000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_IS_SIEGE_WEAPON = 0x00040000, // CREATURE_TYPEFLAGS_IS_SIEGE_WEAPON
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK9 = 0x00080000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK10 = 0x00100000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK11 = 0x00200000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_PROJECTILE_COLLISION = 0x00400000, // CREATURE_TYPEFLAGS_PROJECTILE_COLLISION
|
||||
CREATURE_DIFFICULTYFLAGS_3_CAN_BE_MULTITAPPED = 0x00800000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_DO_NOT_PLAY_MOUNTED_ANIMATIONS = 0x01000000, // CREATURE_TYPEFLAGS_DO_NOT_PLAY_MOUNTED_ANIMATIONS
|
||||
CREATURE_DIFFICULTYFLAGS_3_DISABLE_TURN = 0x02000000, // UNIT_FLAG2_DISABLE_TURN
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK12 = 0x04000000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK13 = 0x08000000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK14 = 0x10000000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_IS_LINK_ALL = 0x20000000, // CREATURE_TYPEFLAGS_IS_LINK_ALL
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK15 = 0x40000000,
|
||||
CREATURE_DIFFICULTYFLAGS_3_UNK16 = 0x80000000
|
||||
};
|
||||
|
||||
enum CreatureDifficultyFlags4
|
||||
{
|
||||
CREATURE_DIFFICULTYFLAGS_4_HAS_NO_BIRTH_ANIMATION = 0x00000001, // SMSG_UPDATE_OBJECT's "NoBirthAnim"
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK1 = 0x00000002,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK2 = 0x00000004,
|
||||
CREATURE_DIFFICULTYFLAGS_4_INTERACT_ONLY_WITH_CREATOR = 0x00000008, // CREATURE_TYPEFLAGS_INTERACT_ONLY_WITH_CREATOR
|
||||
CREATURE_DIFFICULTYFLAGS_4_DO_NOT_PLAY_UNIT_EVENT_SOUNDS = 0x00000010, // CREATURE_TYPEFLAGS_DO_NOT_PLAY_UNIT_EVENT_SOUNDS
|
||||
CREATURE_DIFFICULTYFLAGS_4_HAS_NO_SHADOW_BLOB = 0x00000020, // CREATURE_TYPEFLAGS_HAS_NO_SHADOW_BLOB
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK3 = 0x00000040,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK4 = 0x00000080,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK5 = 0x00000100,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK6 = 0x00000200,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK7 = 0x00000400,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK8 = 0x00000800,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK9 = 0x00001000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK10 = 0x00002000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK11 = 0x00004000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UFLAG2_UNK20 = 0x00008000, // UnitFlags2 0x100000
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK12 = 0x00010000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK13 = 0x00020000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK14 = 0x00040000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_FORCE_GOSSIP = 0x00080000, // CREATURE_TYPEFLAGS_FORCE_GOSSIP
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK15 = 0x00100000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_DO_NOT_SHEATHE = 0x00200000, // CREATURE_TYPEFLAGS_DO_NOT_SHEATHE
|
||||
CREATURE_DIFFICULTYFLAGS_4_IGNORE_SPELL_MIN_RANGE_RESTRICTIONS = 0x00400000, // UnitFlags2 0x8000000
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK16 = 0x00800000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_PREVENT_SWIM = 0x01000000, // UnitFlags2 0x1000000
|
||||
CREATURE_DIFFICULTYFLAGS_4_HIDE_IN_COMBAT_LOG = 0x02000000, // UnitFlags2 0x2000000
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK17 = 0x04000000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK18 = 0x08000000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNK19 = 0x10000000,
|
||||
CREATURE_DIFFICULTYFLAGS_4_DO_NOT_TARGET_ON_INTERACTION = 0x20000000, // CREATURE_TYPEFLAGS_DO_NOT_TARGET_ON_INTERACTION
|
||||
CREATURE_DIFFICULTYFLAGS_4_DO_NOT_RENDER_OBJECT_NAME = 0x40000000, // CREATURE_TYPEFLAGS_DO_NOT_RENDER_OBJECT_NAME
|
||||
CREATURE_DIFFICULTYFLAGS_4_UNIT_IS_QUEST_BOSS = 0x80000000 // CREATURE_TYPEFLAGS_UNIT_IS_QUEST_BOSS
|
||||
};
|
||||
|
||||
enum CreatureDifficultyFlags5
|
||||
{
|
||||
CREATURE_DIFFICULTYFLAGS_5_CANNOT_SWITCH_TARGETS = 0x00000001, // UnitFlags2 0x4000000
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK1 = 0x00000002,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UFLAG2_UNK30 = 0x00000004, // UnitFlags2 0x10000000
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK2 = 0x00000008,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK3 = 0x00000010,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK4 = 0x00000020,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK5 = 0x00000040,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK6 = 0x00000080,
|
||||
CREATURE_DIFFICULTYFLAGS_5_CAN_INTERACT_EVEN_IF_HOSTILE = 0x00000100, // UNIT_FLAG2_ALLOW_ENEMY_INTERACT
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK7 = 0x00000200,
|
||||
CREATURE_DIFFICULTYFLAGS_5_TFLAG2_UNK1 = 0x00000400, // CREATURE_TYPEFLAGS_2_UNK1
|
||||
CREATURE_DIFFICULTYFLAGS_5_TFLAG2_UNK2 = 0x00000800, // CREATURE_TYPEFLAGS_2_UNK2
|
||||
CREATURE_DIFFICULTYFLAGS_5_TFLAG2_UNK3 = 0x00001000, // CREATURE_TYPEFLAGS_2_UNK3
|
||||
CREATURE_DIFFICULTYFLAGS_5_UFLAG2_UNK19 = 0x00002000, // UnitFlags2 0x80000
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK8 = 0x00004000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK9 = 0x00008000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK10 = 0x00010000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK11 = 0x00020000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK12 = 0x00040000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK13 = 0x00080000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_TFLAG2_UNK4 = 0x00100000, // CREATURE_TYPEFLAGS_2_UNK4
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK14 = 0x00200000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK15 = 0x00400000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_TFLAG2_UNK5 = 0x00800000, // CREATURE_TYPEFLAGS_2_UNK5
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK16 = 0x01000000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK17 = 0x02000000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK18 = 0x04000000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK19 = 0x08000000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK20 = 0x10000000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK21 = 0x20000000,
|
||||
CREATURE_DIFFICULTYFLAGS_5_TFLAG2_UNK6 = 0x40000000, // CREATURE_TYPEFLAGS_2_UNK6
|
||||
CREATURE_DIFFICULTYFLAGS_5_UNK22 = 0x80000000
|
||||
};
|
||||
|
||||
enum CreatureDifficultyFlags6
|
||||
{
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK1 = 0x00000001,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK2 = 0x00000002,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK3 = 0x00000004,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK4 = 0x00000008,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK5 = 0x00000010,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK6 = 0x00000020,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK7 = 0x00000040,
|
||||
CREATURE_DIFFICULTYFLAGS_6_TFLAG2_UNK7 = 0x00000080,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK8 = 0x00000100,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK9 = 0x00000200,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK10 = 0x00000400,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK11 = 0x00000800,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK12 = 0x00001000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK13 = 0x00002000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK14 = 0x00004000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK15 = 0x00008000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK16 = 0x00010000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK17 = 0x00020000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK18 = 0x00040000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK19 = 0x00080000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK20 = 0x00100000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK21 = 0x00200000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK22 = 0x00400000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK23 = 0x00800000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK24 = 0x01000000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK25 = 0x02000000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK26 = 0x04000000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK27 = 0x08000000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK28 = 0x10000000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK29 = 0x20000000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_UNK30 = 0x40000000,
|
||||
CREATURE_DIFFICULTYFLAGS_6_TFLAG2_UNK14 = 0x80000000
|
||||
};
|
||||
|
||||
enum CreatureDifficultyFlags7
|
||||
{
|
||||
CREATURE_DIFFICULTYFLAGS_7_TFLAG2_UNK15 = 0x00000001,
|
||||
CREATURE_DIFFICULTYFLAGS_7_TFLAG2_UNK16 = 0x00000002,
|
||||
CREATURE_DIFFICULTYFLAGS_7_TFLAG2_UNK17 = 0x00000004,
|
||||
CREATURE_DIFFICULTYFLAGS_7_UNK1 = 0x00000008
|
||||
};
|
||||
|
||||
enum CreatureFlagsExtra
|
||||
{
|
||||
CREATURE_FLAG_EXTRA_INSTANCE_BIND = 0x00000001, // creature kill bind instance with killer and killer's group
|
||||
CREATURE_FLAG_EXTRA_CIVILIAN = 0x00000002, // not aggro (ignore faction/reputation hostility)
|
||||
CREATURE_FLAG_EXTRA_NO_PARRY = 0x00000004, // creature can't parry
|
||||
CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN = 0x00000008, // creature can't counter-attack at parry
|
||||
CREATURE_FLAG_EXTRA_NO_BLOCK = 0x00000010, // creature can't block
|
||||
CREATURE_FLAG_EXTRA_NO_CRUSH = 0x00000020, // creature can't do crush attacks
|
||||
CREATURE_FLAG_EXTRA_NO_XP_AT_KILL = 0x00000040, // creature kill not provide XP
|
||||
CREATURE_FLAG_EXTRA_TRIGGER = 0x00000080, // trigger creature
|
||||
CREATURE_FLAG_EXTRA_NO_TAUNT = 0x00000100, // creature is immune to taunt auras and effect attack me
|
||||
CREATURE_FLAG_EXTRA_WORLDEVENT = 0x00004000, // custom flag for world event creatures (left room for merging)
|
||||
CREATURE_FLAG_EXTRA_GUARD = 0x00008000, // Creature is guard
|
||||
CREATURE_FLAG_EXTRA_NO_CRIT = 0x00020000, // creature can't do critical strikes
|
||||
CREATURE_FLAG_EXTRA_NO_SKILLGAIN = 0x00040000, // creature won't increase weapon skills
|
||||
CREATURE_FLAG_EXTRA_TAUNT_DIMINISH = 0x00080000, // Taunt is a subject to diminishing returns on this creautre
|
||||
CREATURE_FLAG_EXTRA_ALL_DIMINISH = 0x00100000, // creature is subject to all diminishing returns as player are
|
||||
CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ = 0x00200000, // creature does not need to take player damage for kill credit
|
||||
CREATURE_FLAG_EXTRA_DUNGEON_BOSS = 0x10000000, // creature is a dungeon boss (SET DYNAMICALLY, DO NOT ADD IN DB)
|
||||
CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING = 0x20000000, // creature ignore pathfinding
|
||||
CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK = 0x40000000 // creature is immune to knockback effects
|
||||
};
|
||||
|
||||
#define CREATURE_FLAG_EXTRA_DB_ALLOWED (CREATURE_FLAG_EXTRA_INSTANCE_BIND | CREATURE_FLAG_EXTRA_CIVILIAN | \
|
||||
CREATURE_FLAG_EXTRA_NO_PARRY | CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN | CREATURE_FLAG_EXTRA_NO_BLOCK | \
|
||||
CREATURE_FLAG_EXTRA_NO_CRUSH | CREATURE_FLAG_EXTRA_NO_XP_AT_KILL | CREATURE_FLAG_EXTRA_TRIGGER | \
|
||||
CREATURE_FLAG_EXTRA_NO_TAUNT | CREATURE_FLAG_EXTRA_WORLDEVENT | CREATURE_FLAG_EXTRA_NO_CRIT | \
|
||||
CREATURE_FLAG_EXTRA_NO_SKILLGAIN | CREATURE_FLAG_EXTRA_TAUNT_DIMINISH | CREATURE_FLAG_EXTRA_ALL_DIMINISH | \
|
||||
CREATURE_FLAG_EXTRA_GUARD | CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING | CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ | CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK)
|
||||
|
||||
const uint32 CREATURE_REGEN_INTERVAL = 2 * IN_MILLISECONDS;
|
||||
const uint32 CREATURE_NOPATH_EVADE_TIME = 5 * IN_MILLISECONDS;
|
||||
|
||||
const uint8 MAX_KILL_CREDIT = 2;
|
||||
const uint32 MAX_CREATURE_MODELS = 4;
|
||||
const uint32 MAX_CREATURE_NAMES = 4;
|
||||
const uint32 MAX_CREATURE_SPELLS = 8;
|
||||
const uint32 MAX_CREATURE_DIFFICULTIES = 3;
|
||||
|
||||
// from `creature_template` table
|
||||
struct TC_GAME_API CreatureTemplate
|
||||
{
|
||||
uint32 Entry;
|
||||
uint32 DifficultyEntry[MAX_CREATURE_DIFFICULTIES];
|
||||
uint32 KillCredit[MAX_KILL_CREDIT];
|
||||
uint32 Modelid1;
|
||||
uint32 Modelid2;
|
||||
uint32 Modelid3;
|
||||
uint32 Modelid4;
|
||||
std::string Name;
|
||||
std::string FemaleName;
|
||||
std::string SubName;
|
||||
std::string IconName;
|
||||
uint32 GossipMenuId;
|
||||
int16 minlevel;
|
||||
int16 maxlevel;
|
||||
int32 HealthScalingExpansion;
|
||||
uint32 RequiredExpansion;
|
||||
uint32 VignetteID; /// @todo Read Vignette.db2
|
||||
uint32 faction;
|
||||
uint64 npcflag;
|
||||
float speed_walk;
|
||||
float speed_run;
|
||||
float scale;
|
||||
uint32 rank;
|
||||
uint32 dmgschool;
|
||||
uint32 BaseAttackTime;
|
||||
uint32 RangeAttackTime;
|
||||
float BaseVariance;
|
||||
float RangeVariance;
|
||||
uint32 unit_class; // enum Classes. Note only 4 classes are known for creatures.
|
||||
uint32 unit_flags; // enum UnitFlags mask values
|
||||
uint32 unit_flags2; // enum UnitFlags2 mask values
|
||||
uint32 unit_flags3; // enum UnitFlags3 mask values
|
||||
uint32 dynamicflags;
|
||||
CreatureFamily family; // enum CreatureFamily values (optional)
|
||||
uint32 trainer_type;
|
||||
uint32 trainer_class;
|
||||
uint32 trainer_race;
|
||||
uint32 type; // enum CreatureType values
|
||||
uint32 type_flags; // enum CreatureTypeFlags mask values
|
||||
uint32 type_flags2; // unknown enum, only set for 4 creatures (with value 1)
|
||||
uint32 lootid;
|
||||
uint32 pickpocketLootId;
|
||||
uint32 SkinLootId;
|
||||
int32 resistance[MAX_SPELL_SCHOOL];
|
||||
uint32 spells[MAX_CREATURE_SPELLS];
|
||||
uint32 VehicleId;
|
||||
uint32 mingold;
|
||||
uint32 maxgold;
|
||||
std::string AIName;
|
||||
uint32 MovementType;
|
||||
uint32 InhabitType;
|
||||
float HoverHeight;
|
||||
float ModHealth;
|
||||
float ModHealthExtra;
|
||||
float ModMana;
|
||||
float ModManaExtra; // Added in 4.x, this value is usually 2 for a small group of creatures with double mana
|
||||
float ModArmor;
|
||||
float ModDamage;
|
||||
float ModExperience;
|
||||
bool RacialLeader;
|
||||
uint32 movementId;
|
||||
bool RegenHealth;
|
||||
uint32 MechanicImmuneMask;
|
||||
uint32 flags_extra;
|
||||
uint32 ScriptID;
|
||||
uint32 GetRandomValidModelId() const;
|
||||
uint32 GetFirstValidModelId() const;
|
||||
uint32 GetFirstInvisibleModel() const;
|
||||
uint32 GetFirstVisibleModel() const;
|
||||
|
||||
// helpers
|
||||
SkillType GetRequiredLootSkill() const
|
||||
{
|
||||
if (type_flags & CREATURE_TYPE_FLAG_HERB_SKINNING_SKILL)
|
||||
return SKILL_HERBALISM;
|
||||
else if (type_flags & CREATURE_TYPE_FLAG_MINING_SKINNING_SKILL)
|
||||
return SKILL_MINING;
|
||||
else if (type_flags & CREATURE_TYPE_FLAG_ENGINEERING_SKINNING_SKILL)
|
||||
return SKILL_ENGINEERING;
|
||||
else
|
||||
return SKILL_SKINNING; // normal case
|
||||
}
|
||||
|
||||
bool IsExotic() const
|
||||
{
|
||||
return (type_flags & CREATURE_TYPE_FLAG_EXOTIC_PET) != 0;
|
||||
}
|
||||
|
||||
bool IsTameable(bool canTameExotic) const
|
||||
{
|
||||
if (type != CREATURE_TYPE_BEAST || family == CREATURE_FAMILY_NONE || (type_flags & CREATURE_TYPE_FLAG_TAMEABLE_PET) == 0)
|
||||
return false;
|
||||
|
||||
// if can tame exotic then can tame any tameable
|
||||
return canTameExotic || !IsExotic();
|
||||
}
|
||||
|
||||
static int32 DifficultyIDToDifficultyEntryIndex(uint32 difficulty)
|
||||
{
|
||||
switch (difficulty)
|
||||
{
|
||||
case DIFFICULTY_NONE:
|
||||
case DIFFICULTY_NORMAL:
|
||||
case DIFFICULTY_10_N:
|
||||
case DIFFICULTY_40:
|
||||
case DIFFICULTY_3_MAN_SCENARIO_N:
|
||||
case DIFFICULTY_NORMAL_RAID:
|
||||
return -1;
|
||||
case DIFFICULTY_HEROIC:
|
||||
case DIFFICULTY_25_N:
|
||||
case DIFFICULTY_3_MAN_SCENARIO_HC:
|
||||
case DIFFICULTY_HEROIC_RAID:
|
||||
return 0;
|
||||
case DIFFICULTY_10_HC:
|
||||
case DIFFICULTY_MYTHIC_KEYSTONE:
|
||||
case DIFFICULTY_MYTHIC_RAID:
|
||||
return 1;
|
||||
case DIFFICULTY_25_HC:
|
||||
return 2;
|
||||
case DIFFICULTY_LFR:
|
||||
case DIFFICULTY_LFR_NEW:
|
||||
case DIFFICULTY_EVENT_RAID:
|
||||
case DIFFICULTY_EVENT_DUNGEON:
|
||||
case DIFFICULTY_EVENT_SCENARIO:
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
// Defines base stats for creatures (used to calculate HP/mana/armor/attackpower/rangedattackpower/all damage).
|
||||
struct TC_GAME_API CreatureBaseStats
|
||||
{
|
||||
uint32 BaseHealth[MAX_EXPANSIONS];
|
||||
uint32 BaseMana;
|
||||
uint32 BaseArmor;
|
||||
uint32 AttackPower;
|
||||
uint32 RangedAttackPower;
|
||||
float BaseDamage[MAX_EXPANSIONS];
|
||||
|
||||
// Helpers
|
||||
|
||||
uint32 GenerateHealth(CreatureTemplate const* info) const
|
||||
{
|
||||
return uint32(ceil(BaseHealth[info->HealthScalingExpansion] * info->ModHealth * info->ModHealthExtra));
|
||||
}
|
||||
|
||||
uint32 GenerateMana(CreatureTemplate const* info) const
|
||||
{
|
||||
// Mana can be 0.
|
||||
if (!BaseMana)
|
||||
return 0;
|
||||
|
||||
return uint32(ceil(BaseMana * info->ModMana * info->ModManaExtra));
|
||||
}
|
||||
|
||||
uint32 GenerateArmor(CreatureTemplate const* info) const
|
||||
{
|
||||
return uint32(ceil(BaseArmor * info->ModArmor));
|
||||
}
|
||||
|
||||
float GenerateBaseDamage(CreatureTemplate const* info) const
|
||||
{
|
||||
return BaseDamage[info->HealthScalingExpansion];
|
||||
}
|
||||
|
||||
static CreatureBaseStats const* GetBaseStats(uint8 level, uint8 unitClass);
|
||||
};
|
||||
|
||||
struct CreatureLocale
|
||||
{
|
||||
std::vector<std::string> Name;
|
||||
std::vector<std::string> NameAlt;
|
||||
std::vector<std::string> Title;
|
||||
std::vector<std::string> TitleAlt;
|
||||
};
|
||||
|
||||
struct EquipmentItem
|
||||
{
|
||||
uint32 ItemId = 0;
|
||||
uint16 AppearanceModId = 0;
|
||||
uint16 ItemVisual = 0;
|
||||
};
|
||||
|
||||
struct EquipmentInfo
|
||||
{
|
||||
EquipmentItem Items[MAX_EQUIPMENT_ITEMS];
|
||||
};
|
||||
|
||||
// from `creature` table
|
||||
struct CreatureData
|
||||
{
|
||||
CreatureData() : id(0), mapid(0), phaseMask(0), displayid(0), equipmentId(0),
|
||||
posX(0.0f), posY(0.0f), posZ(0.0f), orientation(0.0f), spawntimesecs(0),
|
||||
spawndist(0.0f), currentwaypoint(0), curhealth(0), curmana(0), movementType(0),
|
||||
spawnMask(0), npcflag(0), unit_flags(0), unit_flags2(0), unit_flags3(0), dynamicflags(0),
|
||||
phaseid(0), phaseGroup(0), dbData(true) { }
|
||||
uint32 id; // entry in creature_template
|
||||
uint16 mapid;
|
||||
uint32 phaseMask;
|
||||
uint32 displayid;
|
||||
int8 equipmentId;
|
||||
float posX;
|
||||
float posY;
|
||||
float posZ;
|
||||
float orientation;
|
||||
uint32 spawntimesecs;
|
||||
float spawndist;
|
||||
uint32 currentwaypoint;
|
||||
uint32 curhealth;
|
||||
uint32 curmana;
|
||||
uint8 movementType;
|
||||
uint32 spawnMask;
|
||||
uint64 npcflag;
|
||||
uint32 unit_flags; // enum UnitFlags mask values
|
||||
uint32 unit_flags2; // enum UnitFlags2 mask values
|
||||
uint32 unit_flags3; // enum UnitFlags3 mask values
|
||||
uint32 dynamicflags;
|
||||
uint32 phaseid;
|
||||
uint32 phaseGroup;
|
||||
uint32 ScriptId;
|
||||
bool dbData;
|
||||
};
|
||||
|
||||
struct CreatureModelInfo
|
||||
{
|
||||
float bounding_radius;
|
||||
float combat_reach;
|
||||
int8 gender;
|
||||
uint32 displayId_other_gender;
|
||||
bool is_trigger;
|
||||
};
|
||||
|
||||
enum InhabitTypeValues
|
||||
{
|
||||
INHABIT_GROUND = 1,
|
||||
INHABIT_WATER = 2,
|
||||
INHABIT_AIR = 4,
|
||||
INHABIT_ROOT = 8,
|
||||
INHABIT_ANYWHERE = INHABIT_GROUND | INHABIT_WATER | INHABIT_AIR | INHABIT_ROOT
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
// `creature_addon` table
|
||||
struct CreatureAddon
|
||||
{
|
||||
uint32 path_id;
|
||||
uint32 mount;
|
||||
uint32 bytes1;
|
||||
uint32 bytes2;
|
||||
uint32 emote;
|
||||
uint16 aiAnimKit;
|
||||
uint16 movementAnimKit;
|
||||
uint16 meleeAnimKit;
|
||||
std::vector<uint32> auras;
|
||||
};
|
||||
|
||||
// Vendors
|
||||
struct VendorItem
|
||||
{
|
||||
VendorItem(uint32 _item, int32 _maxcount, uint32 _incrtime, uint32 _ExtendedCost, uint8 _Type)
|
||||
: item(_item), maxcount(_maxcount), incrtime(_incrtime), ExtendedCost(_ExtendedCost), Type(_Type) { }
|
||||
|
||||
uint32 item;
|
||||
uint32 maxcount; // 0 for infinity item amount
|
||||
uint32 incrtime; // time for restore items amount if maxcount != 0
|
||||
uint32 ExtendedCost;
|
||||
uint8 Type;
|
||||
|
||||
//helpers
|
||||
bool IsGoldRequired(ItemTemplate const* pProto) const;
|
||||
};
|
||||
|
||||
struct VendorItemData
|
||||
{
|
||||
std::vector<VendorItem> m_items;
|
||||
|
||||
VendorItem const* GetItem(uint32 slot) const
|
||||
{
|
||||
if (slot >= m_items.size())
|
||||
return nullptr;
|
||||
|
||||
return &m_items[slot];
|
||||
}
|
||||
bool Empty() const { return m_items.empty(); }
|
||||
uint32 GetItemCount() const { return uint32(m_items.size()); }
|
||||
void AddItem(uint32 item, int32 maxcount, uint32 ptime, uint32 ExtendedCost, uint8 type)
|
||||
{
|
||||
m_items.emplace_back(item, maxcount, ptime, ExtendedCost, type);
|
||||
}
|
||||
bool RemoveItem(uint32 item_id, uint8 type);
|
||||
VendorItem const* FindItemCostPair(uint32 item_id, uint32 extendedCost, uint8 type) const;
|
||||
void Clear()
|
||||
{
|
||||
m_items.clear();
|
||||
}
|
||||
};
|
||||
|
||||
#define MAX_TRAINERSPELL_ABILITY_REQS 3
|
||||
|
||||
struct TrainerSpell
|
||||
{
|
||||
TrainerSpell() : SpellID(0), MoneyCost(0), ReqSkillLine(0), ReqSkillRank(0), ReqLevel(0), Index(0)
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_TRAINERSPELL_ABILITY_REQS; ++i)
|
||||
ReqAbility[i] = 0;
|
||||
}
|
||||
|
||||
uint32 SpellID;
|
||||
uint32 MoneyCost;
|
||||
uint32 ReqSkillLine;
|
||||
uint32 ReqSkillRank;
|
||||
uint32 ReqLevel;
|
||||
uint32 ReqAbility[MAX_TRAINERSPELL_ABILITY_REQS];
|
||||
uint32 Index;
|
||||
|
||||
// helpers
|
||||
bool IsCastable() const { return ReqAbility[0] != SpellID; }
|
||||
};
|
||||
|
||||
typedef std::unordered_map<uint32 /*spellid*/, TrainerSpell> TrainerSpellMap;
|
||||
|
||||
struct TC_GAME_API TrainerSpellData
|
||||
{
|
||||
TrainerSpellData() : trainerType(0) { }
|
||||
~TrainerSpellData() { spellList.clear(); }
|
||||
|
||||
TrainerSpellMap spellList;
|
||||
uint32 trainerType; // trainer type based at trainer spells, can be different from creature_template value.
|
||||
// req. for correct show non-prof. trainers like weaponmaster, allowed values 0 and 2.
|
||||
TrainerSpell const* Find(uint32 spell_id) const;
|
||||
};
|
||||
|
||||
#endif // CreatureData_h__
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "CreatureAI.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectMgr.h"
|
||||
|
||||
#define MAX_DESYNC 5.0f
|
||||
|
||||
@@ -17,12 +17,16 @@
|
||||
*/
|
||||
|
||||
#include "GossipDef.h"
|
||||
#include "Formulas.h"
|
||||
#include "Creature.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Log.h"
|
||||
#include "NPCPackets.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "QuestDef.h"
|
||||
#include "QuestPackets.h"
|
||||
#include "World.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
GossipMenu::GossipMenu()
|
||||
|
||||
@@ -16,11 +16,12 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Log.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "DB2Structure.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Pet.h"
|
||||
#include "Player.h"
|
||||
|
||||
@@ -252,7 +253,7 @@ void TempSummon::UnSummon(uint32 msTime)
|
||||
//ASSERT(!IsPet());
|
||||
if (IsPet())
|
||||
{
|
||||
((Pet*)this)->Remove(PET_SAVE_NOT_IN_SLOT);
|
||||
ToPet()->Remove(PET_SAVE_NOT_IN_SLOT);
|
||||
ASSERT(!IsInWorld());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -21,21 +21,7 @@
|
||||
|
||||
#include "Creature.h"
|
||||
|
||||
enum SummonerType
|
||||
{
|
||||
SUMMONER_TYPE_CREATURE = 0,
|
||||
SUMMONER_TYPE_GAMEOBJECT = 1,
|
||||
SUMMONER_TYPE_MAP = 2
|
||||
};
|
||||
|
||||
/// Stores data for temp summons
|
||||
struct TempSummonData
|
||||
{
|
||||
uint32 entry; ///< Entry of summoned creature
|
||||
Position pos; ///< Position, where should be creature spawned
|
||||
TempSummonType type; ///< Summon type, see TempSummonType for available types
|
||||
uint32 time; ///< Despawn time, usable only with certain temp summon types
|
||||
};
|
||||
struct SummonPropertiesEntry;
|
||||
|
||||
class TC_GAME_API TempSummon : public Creature
|
||||
{
|
||||
|
||||
@@ -16,13 +16,19 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "DynamicObject.h"
|
||||
#include "Common.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "Transport.h"
|
||||
#include "Unit.h"
|
||||
#include "UpdateData.h"
|
||||
#include "World.h"
|
||||
|
||||
DynamicObject::DynamicObject(bool isWorldObject) : WorldObject(isWorldObject),
|
||||
@@ -236,3 +242,8 @@ void DynamicObject::UnbindFromCaster()
|
||||
_caster->_UnregisterDynObject(this);
|
||||
_caster = NULL;
|
||||
}
|
||||
|
||||
SpellInfo const* DynamicObject::GetSpellInfo() const
|
||||
{
|
||||
return sSpellMgr->GetSpellInfo(GetSpellId());
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ class TC_GAME_API DynamicObject : public WorldObject, public GridObject<DynamicO
|
||||
void BindToCaster();
|
||||
void UnbindFromCaster();
|
||||
uint32 GetSpellId() const { return GetUInt32Value(DYNAMICOBJECT_SPELLID); }
|
||||
SpellInfo const* GetSpellInfo() const;
|
||||
ObjectGuid GetCasterGUID() const { return GetGuidValue(DYNAMICOBJECT_CASTER); }
|
||||
float GetRadius() const { return GetFloatValue(DYNAMICOBJECT_RADIUS); }
|
||||
|
||||
|
||||
@@ -28,9 +28,11 @@
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Group.h"
|
||||
#include "GroupMgr.h"
|
||||
#include "Item.h"
|
||||
#include "Log.h"
|
||||
#include "LootMgr.h"
|
||||
#include "MiscPackets.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "PoolMgr.h"
|
||||
@@ -41,6 +43,17 @@
|
||||
#include "World.h"
|
||||
#include <G3D/Quat.h>
|
||||
|
||||
bool QuaternionData::isUnit() const
|
||||
{
|
||||
return fabs(x * x + y * y + z * z + w * w - 1.0f) < 1e-5;
|
||||
}
|
||||
|
||||
QuaternionData QuaternionData::fromEulerAnglesZYX(float Z, float Y, float X)
|
||||
{
|
||||
G3D::Quat quat(G3D::Matrix3::fromEulerAnglesZYX(Z, Y, X));
|
||||
return QuaternionData(quat.x, quat.y, quat.z, quat.w);
|
||||
}
|
||||
|
||||
GameObject::GameObject() : WorldObject(false), MapObject(),
|
||||
m_model(nullptr), m_goValue(), m_AI(nullptr), _animKitId(0)
|
||||
{
|
||||
|
||||
@@ -19,820 +19,21 @@
|
||||
#ifndef TRINITYCORE_GAMEOBJECT_H
|
||||
#define TRINITYCORE_GAMEOBJECT_H
|
||||
|
||||
#include "Common.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "Object.h"
|
||||
#include "Loot.h"
|
||||
#include "DatabaseEnvFwd.h"
|
||||
#include "GameObjectData.h"
|
||||
#include "Loot.h"
|
||||
#include "MapObject.h"
|
||||
#include "SharedDefines.h"
|
||||
|
||||
class GameObjectAI;
|
||||
class GameObjectModel;
|
||||
class Group;
|
||||
class Transport;
|
||||
enum TriggerCastFlags : uint32;
|
||||
|
||||
// from `gameobject_template`
|
||||
struct GameObjectTemplate
|
||||
{
|
||||
uint32 entry;
|
||||
uint32 type;
|
||||
uint32 displayId;
|
||||
std::string name;
|
||||
std::string IconName;
|
||||
std::string castBarCaption;
|
||||
std::string unk1;
|
||||
float size;
|
||||
int32 RequiredLevel;
|
||||
union
|
||||
{
|
||||
// 0 GAMEOBJECT_TYPE_DOOR
|
||||
struct
|
||||
{
|
||||
uint32 startOpen; // 0 startOpen, enum { false, true, }; Default: false
|
||||
uint32 open; // 1 open, References: Lock_, NoValue = 0
|
||||
uint32 autoClose; // 2 autoClose (ms), int, Min value: 0, Max value: 2147483647, Default value: 3000
|
||||
uint32 noDamageImmune; // 3 noDamageImmune, enum { false, true, }; Default: false
|
||||
uint32 openTextID; // 4 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 closeTextID; // 5 closeTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 IgnoredByPathing; // 6 Ignored By Pathing, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 7 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 DoorisOpaque; // 8 Door is Opaque (Disable portal on close), enum { false, true, }; Default: true
|
||||
uint32 GiganticAOI; // 9 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 InfiniteAOI; // 10 Infinite AOI, enum { false, true, }; Default: false
|
||||
} door;
|
||||
// 1 GAMEOBJECT_TYPE_BUTTON
|
||||
struct
|
||||
{
|
||||
uint32 startOpen; // 0 startOpen, enum { false, true, }; Default: false
|
||||
uint32 open; // 1 open, References: Lock_, NoValue = 0
|
||||
uint32 autoClose; // 2 autoClose (ms), int, Min value: 0, Max value: 2147483647, Default value: 3000
|
||||
uint32 linkedTrap; // 3 linkedTrap, References: GameObjects, NoValue = 0
|
||||
uint32 noDamageImmune; // 4 noDamageImmune, enum { false, true, }; Default: false
|
||||
uint32 GiganticAOI; // 5 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 openTextID; // 6 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 closeTextID; // 7 closeTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 requireLOS; // 8 require LOS, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 9 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
} button;
|
||||
// 2 GAMEOBJECT_TYPE_QUESTGIVER
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 questGiver; // 1 questGiver, References: QuestGiver, NoValue = 0
|
||||
uint32 pageMaterial; // 2 pageMaterial, References: PageTextMaterial, NoValue = 0
|
||||
uint32 gossipID; // 3 gossipID, References: Gossip, NoValue = 0
|
||||
uint32 customAnim; // 4 customAnim, int, Min value: 0, Max value: 4, Default value: 0
|
||||
uint32 noDamageImmune; // 5 noDamageImmune, enum { false, true, }; Default: false
|
||||
uint32 openTextID; // 6 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 requireLOS; // 7 require LOS, enum { false, true, }; Default: false
|
||||
uint32 allowMounted; // 8 allowMounted, enum { false, true, }; Default: false
|
||||
uint32 GiganticAOI; // 9 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 10 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 NeverUsableWhileMounted; // 11 Never Usable While Mounted, enum { false, true, }; Default: false
|
||||
} questgiver;
|
||||
// 3 GAMEOBJECT_TYPE_CHEST
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 chestLoot; // 1 chestLoot, References: Treasure, NoValue = 0
|
||||
uint32 chestRestockTime; // 2 chestRestockTime, int, Min value: 0, Max value: 1800000, Default value: 0
|
||||
uint32 consumable; // 3 consumable, enum { false, true, }; Default: false
|
||||
uint32 minRestock; // 4 minRestock, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 maxRestock; // 5 maxRestock, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 triggeredEvent; // 6 triggeredEvent, References: GameEvents, NoValue = 0
|
||||
uint32 linkedTrap; // 7 linkedTrap, References: GameObjects, NoValue = 0
|
||||
uint32 questID; // 8 questID, References: QuestV2, NoValue = 0
|
||||
uint32 level; // 9 level, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 requireLOS; // 10 require LOS, enum { false, true, }; Default: false
|
||||
uint32 leaveLoot; // 11 leaveLoot, enum { false, true, }; Default: false
|
||||
uint32 notInCombat; // 12 notInCombat, enum { false, true, }; Default: false
|
||||
uint32 logloot; // 13 log loot, enum { false, true, }; Default: false
|
||||
uint32 openTextID; // 14 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 usegrouplootrules; // 15 use group loot rules, enum { false, true, }; Default: false
|
||||
uint32 floatingTooltip; // 16 floatingTooltip, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 17 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
int32 xpLevel; // 18 xpLevel, int, Min value: -1, Max value: 123, Default value: 0
|
||||
uint32 xpDifficulty; // 19 xpDifficulty, enum { No Exp, Trivial, Very Small, Small, Substandard, Standard, High, Epic, Dungeon, 5, }; Default: No Exp
|
||||
uint32 lootLevel; // 20 lootLevel, int, Min value: 0, Max value: 123, Default value: 0
|
||||
uint32 GroupXP; // 21 Group XP, enum { false, true, }; Default: false
|
||||
uint32 DamageImmuneOK; // 22 Damage Immune OK, enum { false, true, }; Default: false
|
||||
uint32 trivialSkillLow; // 23 trivialSkillLow, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 trivialSkillHigh; // 24 trivialSkillHigh, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 DungeonEncounter; // 25 Dungeon Encounter, References: DungeonEncounter, NoValue = 0
|
||||
uint32 spell; // 26 spell, References: Spell, NoValue = 0
|
||||
uint32 GiganticAOI; // 27 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 LargeAOI; // 28 Large AOI, enum { false, true, }; Default: false
|
||||
uint32 SpawnVignette; // 29 Spawn Vignette, References: vignette, NoValue = 0
|
||||
uint32 chestPersonalLoot; // 30 chest Personal Loot, References: Treasure, NoValue = 0
|
||||
uint32 turnpersonallootsecurityoff; // 31 turn personal loot security off, enum { false, true, }; Default: false
|
||||
uint32 ChestProperties; // 32 Chest Properties, References: ChestProperties, NoValue = 0
|
||||
} chest;
|
||||
// 4 GAMEOBJECT_TYPE_BINDER
|
||||
struct
|
||||
{
|
||||
} binder;
|
||||
// 5 GAMEOBJECT_TYPE_GENERIC
|
||||
struct
|
||||
{
|
||||
uint32 floatingTooltip; // 0 floatingTooltip, enum { false, true, }; Default: false
|
||||
uint32 highlight; // 1 highlight, enum { false, true, }; Default: true
|
||||
uint32 serverOnly; // 2 serverOnly, enum { false, true, }; Default: false
|
||||
uint32 GiganticAOI; // 3 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 floatOnWater; // 4 floatOnWater, enum { false, true, }; Default: false
|
||||
uint32 questID; // 5 questID, References: QuestV2, NoValue = 0
|
||||
uint32 conditionID1; // 6 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 LargeAOI; // 7 Large AOI, enum { false, true, }; Default: false
|
||||
uint32 UseGarrisonOwnerGuildColors; // 8 Use Garrison Owner Guild Colors, enum { false, true, }; Default: false
|
||||
} generic;
|
||||
// 6 GAMEOBJECT_TYPE_TRAP
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 level; // 1 level, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 radius; // 2 radius, int, Min value: 0, Max value: 100, Default value: 0
|
||||
uint32 spell; // 3 spell, References: Spell, NoValue = 0
|
||||
uint32 charges; // 4 charges, int, Min value: 0, Max value: 65535, Default value: 1
|
||||
uint32 cooldown; // 5 cooldown, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 autoClose; // 6 autoClose (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 startDelay; // 7 startDelay, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 serverOnly; // 8 serverOnly, enum { false, true, }; Default: false
|
||||
uint32 stealthed; // 9 stealthed, enum { false, true, }; Default: false
|
||||
uint32 GiganticAOI; // 10 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 stealthAffected; // 11 stealthAffected, enum { false, true, }; Default: false
|
||||
uint32 openTextID; // 12 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 closeTextID; // 13 closeTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 IgnoreTotems; // 14 Ignore Totems, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 15 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 playerCast; // 16 playerCast, enum { false, true, }; Default: false
|
||||
uint32 SummonerTriggered; // 17 Summoner Triggered, enum { false, true, }; Default: false
|
||||
uint32 requireLOS; // 18 require LOS, enum { false, true, }; Default: false
|
||||
} trap;
|
||||
// 7 GAMEOBJECT_TYPE_CHAIR
|
||||
struct
|
||||
{
|
||||
uint32 chairslots; // 0 chairslots, int, Min value: 1, Max value: 5, Default value: 1
|
||||
uint32 chairheight; // 1 chairheight, int, Min value: 0, Max value: 2, Default value: 1
|
||||
uint32 onlyCreatorUse; // 2 onlyCreatorUse, enum { false, true, }; Default: false
|
||||
uint32 triggeredEvent; // 3 triggeredEvent, References: GameEvents, NoValue = 0
|
||||
uint32 conditionID1; // 4 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
} chair;
|
||||
// 8 GAMEOBJECT_TYPE_SPELL_FOCUS
|
||||
struct
|
||||
{
|
||||
uint32 spellFocusType; // 0 spellFocusType, References: SpellFocusObject, NoValue = 0
|
||||
uint32 radius; // 1 radius, int, Min value: 0, Max value: 50, Default value: 10
|
||||
uint32 linkedTrap; // 2 linkedTrap, References: GameObjects, NoValue = 0
|
||||
uint32 serverOnly; // 3 serverOnly, enum { false, true, }; Default: false
|
||||
uint32 questID; // 4 questID, References: QuestV2, NoValue = 0
|
||||
uint32 GiganticAOI; // 5 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 floatingTooltip; // 6 floatingTooltip, enum { false, true, }; Default: false
|
||||
uint32 floatOnWater; // 7 floatOnWater, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 8 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
} spellFocus;
|
||||
// 9 GAMEOBJECT_TYPE_TEXT
|
||||
struct
|
||||
{
|
||||
uint32 pageID; // 0 pageID, References: PageText, NoValue = 0
|
||||
uint32 language; // 1 language, References: Languages, NoValue = 0
|
||||
uint32 pageMaterial; // 2 pageMaterial, References: PageTextMaterial, NoValue = 0
|
||||
uint32 allowMounted; // 3 allowMounted, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 4 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 NeverUsableWhileMounted; // 5 Never Usable While Mounted, enum { false, true, }; Default: false
|
||||
} text;
|
||||
// 10 GAMEOBJECT_TYPE_GOOBER
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 questID; // 1 questID, References: QuestV2, NoValue = 0
|
||||
uint32 eventID; // 2 eventID, References: GameEvents, NoValue = 0
|
||||
uint32 autoClose; // 3 autoClose (ms), int, Min value: 0, Max value: 2147483647, Default value: 3000
|
||||
uint32 customAnim; // 4 customAnim, int, Min value: 0, Max value: 4, Default value: 0
|
||||
uint32 consumable; // 5 consumable, enum { false, true, }; Default: false
|
||||
uint32 cooldown; // 6 cooldown, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 pageID; // 7 pageID, References: PageText, NoValue = 0
|
||||
uint32 language; // 8 language, References: Languages, NoValue = 0
|
||||
uint32 pageMaterial; // 9 pageMaterial, References: PageTextMaterial, NoValue = 0
|
||||
uint32 spell; // 10 spell, References: Spell, NoValue = 0
|
||||
uint32 noDamageImmune; // 11 noDamageImmune, enum { false, true, }; Default: false
|
||||
uint32 linkedTrap; // 12 linkedTrap, References: GameObjects, NoValue = 0
|
||||
uint32 GiganticAOI; // 13 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 openTextID; // 14 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 closeTextID; // 15 closeTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 requireLOS; // 16 require LOS, enum { false, true, }; Default: false
|
||||
uint32 allowMounted; // 17 allowMounted, enum { false, true, }; Default: false
|
||||
uint32 floatingTooltip; // 18 floatingTooltip, enum { false, true, }; Default: false
|
||||
uint32 gossipID; // 19 gossipID, References: Gossip, NoValue = 0
|
||||
uint32 AllowMultiInteract; // 20 Allow Multi-Interact, enum { false, true, }; Default: false
|
||||
uint32 floatOnWater; // 21 floatOnWater, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 22 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 playerCast; // 23 playerCast, enum { false, true, }; Default: false
|
||||
uint32 SpawnVignette; // 24 Spawn Vignette, References: vignette, NoValue = 0
|
||||
uint32 startOpen; // 25 startOpen, enum { false, true, }; Default: false
|
||||
uint32 DontPlayOpenAnim; // 26 Dont Play Open Anim, enum { false, true, }; Default: false
|
||||
uint32 IgnoreBoundingBox; // 27 Ignore Bounding Box, enum { false, true, }; Default: false
|
||||
uint32 NeverUsableWhileMounted; // 28 Never Usable While Mounted, enum { false, true, }; Default: false
|
||||
uint32 SortFarZ; // 29 Sort Far Z, enum { false, true, }; Default: false
|
||||
uint32 SyncAnimationtoObjectLifetime; // 30 Sync Animation to Object Lifetime (global track only), enum { false, true, }; Default: false
|
||||
uint32 NoFuzzyHit; // 31 No Fuzzy Hit, enum { false, true, }; Default: false
|
||||
} goober;
|
||||
// 11 GAMEOBJECT_TYPE_TRANSPORT
|
||||
struct
|
||||
{
|
||||
uint32 Timeto2ndfloor; // 0 Time to 2nd floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 startOpen; // 1 startOpen, enum { false, true, }; Default: false
|
||||
uint32 autoClose; // 2 autoClose (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Reached1stfloor; // 3 Reached 1st floor, References: GameEvents, NoValue = 0
|
||||
uint32 Reached2ndfloor; // 4 Reached 2nd floor, References: GameEvents, NoValue = 0
|
||||
int32 SpawnMap; // 5 Spawn Map, References: Map, NoValue = -1
|
||||
uint32 Timeto3rdfloor; // 6 Time to 3rd floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Reached3rdfloor; // 7 Reached 3rd floor, References: GameEvents, NoValue = 0
|
||||
uint32 Timeto4thfloor; // 8 Time to 4th floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Reached4thfloor; // 9 Reached 4th floor, References: GameEvents, NoValue = 0
|
||||
uint32 Timeto5thfloor; // 10 Time to 5th floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Reached5thfloor; // 11 Reached 5th floor, References: GameEvents, NoValue = 0
|
||||
uint32 Timeto6thfloor; // 12 Time to 6th floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Reached6thfloor; // 13 Reached 6th floor, References: GameEvents, NoValue = 0
|
||||
uint32 Timeto7thfloor; // 14 Time to 7th floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Reached7thfloor; // 15 Reached 7th floor, References: GameEvents, NoValue = 0
|
||||
uint32 Timeto8thfloor; // 16 Time to 8th floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Reached8thfloor; // 17 Reached 8th floor, References: GameEvents, NoValue = 0
|
||||
uint32 Timeto9thfloor; // 18 Time to 9th floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Reached9thfloor; // 19 Reached 9th floor, References: GameEvents, NoValue = 0
|
||||
uint32 Timeto10thfloor; // 20 Time to 10th floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Reached10thfloor; // 21 Reached 10th floor, References: GameEvents, NoValue = 0
|
||||
uint32 onlychargeheightcheck; // 22 only charge height check. (yards), int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 onlychargetimecheck; // 23 only charge time check, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
} transport;
|
||||
// 12 GAMEOBJECT_TYPE_AREADAMAGE
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 radius; // 1 radius, int, Min value: 0, Max value: 50, Default value: 3
|
||||
uint32 damageMin; // 2 damageMin, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 damageMax; // 3 damageMax, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 damageSchool; // 4 damageSchool, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 autoClose; // 5 autoClose (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 openTextID; // 6 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 closeTextID; // 7 closeTextID, References: BroadcastText, NoValue = 0
|
||||
} areaDamage;
|
||||
// 13 GAMEOBJECT_TYPE_CAMERA
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 camera; // 1 camera, References: CinematicSequences, NoValue = 0
|
||||
uint32 eventID; // 2 eventID, References: GameEvents, NoValue = 0
|
||||
uint32 openTextID; // 3 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 conditionID1; // 4 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
} camera;
|
||||
// 14 GAMEOBJECT_TYPE_MAP_OBJECT
|
||||
struct
|
||||
{
|
||||
} mapobject;
|
||||
// 15 GAMEOBJECT_TYPE_MAP_OBJ_TRANSPORT
|
||||
struct
|
||||
{
|
||||
uint32 taxiPathID; // 0 taxiPathID, References: TaxiPath, NoValue = 0
|
||||
uint32 moveSpeed; // 1 moveSpeed, int, Min value: 1, Max value: 60, Default value: 1
|
||||
uint32 accelRate; // 2 accelRate, int, Min value: 1, Max value: 20, Default value: 1
|
||||
uint32 startEventID; // 3 startEventID, References: GameEvents, NoValue = 0
|
||||
uint32 stopEventID; // 4 stopEventID, References: GameEvents, NoValue = 0
|
||||
uint32 transportPhysics; // 5 transportPhysics, References: TransportPhysics, NoValue = 0
|
||||
int32 SpawnMap; // 6 Spawn Map, References: Map, NoValue = -1
|
||||
uint32 worldState1; // 7 worldState1, References: WorldState, NoValue = 0
|
||||
uint32 allowstopping; // 8 allow stopping, enum { false, true, }; Default: false
|
||||
uint32 InitStopped; // 9 Init Stopped, enum { false, true, }; Default: false
|
||||
uint32 TrueInfiniteAOI; // 10 True Infinite AOI (programmer only!), enum { false, true, }; Default: false
|
||||
} moTransport;
|
||||
// 16 GAMEOBJECT_TYPE_DUEL_ARBITER
|
||||
struct
|
||||
{
|
||||
} duelFlag;
|
||||
// 17 GAMEOBJECT_TYPE_FISHINGNODE
|
||||
struct
|
||||
{
|
||||
} fishingNode;
|
||||
// 18 GAMEOBJECT_TYPE_RITUAL
|
||||
struct
|
||||
{
|
||||
uint32 casters; // 0 casters, int, Min value: 1, Max value: 10, Default value: 1
|
||||
uint32 spell; // 1 spell, References: Spell, NoValue = 0
|
||||
uint32 animSpell; // 2 animSpell, References: Spell, NoValue = 0
|
||||
uint32 ritualPersistent; // 3 ritualPersistent, enum { false, true, }; Default: false
|
||||
uint32 casterTargetSpell; // 4 casterTargetSpell, References: Spell, NoValue = 0
|
||||
uint32 casterTargetSpellTargets; // 5 casterTargetSpellTargets, int, Min value: 1, Max value: 10, Default value: 1
|
||||
uint32 castersGrouped; // 6 castersGrouped, enum { false, true, }; Default: true
|
||||
uint32 ritualNoTargetCheck; // 7 ritualNoTargetCheck, enum { false, true, }; Default: true
|
||||
uint32 conditionID1; // 8 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
} ritual;
|
||||
// 19 GAMEOBJECT_TYPE_MAILBOX
|
||||
struct
|
||||
{
|
||||
uint32 conditionID1; // 0 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
} mailbox;
|
||||
// 20 GAMEOBJECT_TYPE_DO_NOT_USE
|
||||
struct
|
||||
{
|
||||
} DONOTUSE;
|
||||
// 21 GAMEOBJECT_TYPE_GUARDPOST
|
||||
struct
|
||||
{
|
||||
uint32 creatureID; // 0 creatureID, References: Creature, NoValue = 0
|
||||
uint32 charges; // 1 charges, int, Min value: 0, Max value: 65535, Default value: 1
|
||||
} guardPost;
|
||||
// 22 GAMEOBJECT_TYPE_SPELLCASTER
|
||||
struct
|
||||
{
|
||||
uint32 spell; // 0 spell, References: Spell, NoValue = 0
|
||||
int32 charges; // 1 charges, int, Min value: -1, Max value: 65535, Default value: 1
|
||||
uint32 partyOnly; // 2 partyOnly, enum { false, true, }; Default: false
|
||||
uint32 allowMounted; // 3 allowMounted, enum { false, true, }; Default: false
|
||||
uint32 GiganticAOI; // 4 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 5 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 playerCast; // 6 playerCast, enum { false, true, }; Default: false
|
||||
uint32 NeverUsableWhileMounted; // 7 Never Usable While Mounted, enum { false, true, }; Default: false
|
||||
} spellCaster;
|
||||
// 23 GAMEOBJECT_TYPE_MEETINGSTONE
|
||||
struct
|
||||
{
|
||||
uint32 minLevel; // 0 minLevel, int, Min value: 0, Max value: 65535, Default value: 1
|
||||
uint32 maxLevel; // 1 maxLevel, int, Min value: 1, Max value: 65535, Default value: 60
|
||||
uint32 areaID; // 2 areaID, References: AreaTable, NoValue = 0
|
||||
} meetingStone;
|
||||
// 24 GAMEOBJECT_TYPE_FLAGSTAND
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 pickupSpell; // 1 pickupSpell, References: Spell, NoValue = 0
|
||||
uint32 radius; // 2 radius, int, Min value: 0, Max value: 50, Default value: 0
|
||||
uint32 returnAura; // 3 returnAura, References: Spell, NoValue = 0
|
||||
uint32 returnSpell; // 4 returnSpell, References: Spell, NoValue = 0
|
||||
uint32 noDamageImmune; // 5 noDamageImmune, enum { false, true, }; Default: false
|
||||
uint32 openTextID; // 6 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 requireLOS; // 7 require LOS, enum { false, true, }; Default: true
|
||||
uint32 conditionID1; // 8 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 playerCast; // 9 playerCast, enum { false, true, }; Default: false
|
||||
uint32 GiganticAOI; // 10 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 InfiniteAOI; // 11 Infinite AOI, enum { false, true, }; Default: false
|
||||
uint32 cooldown; // 12 cooldown, int, Min value: 0, Max value: 2147483647, Default value: 3000
|
||||
} flagStand;
|
||||
// 25 GAMEOBJECT_TYPE_FISHINGHOLE
|
||||
struct
|
||||
{
|
||||
uint32 radius; // 0 radius, int, Min value: 0, Max value: 50, Default value: 0
|
||||
uint32 chestLoot; // 1 chestLoot, References: Treasure, NoValue = 0
|
||||
uint32 minRestock; // 2 minRestock, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 maxRestock; // 3 maxRestock, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 open; // 4 open, References: Lock_, NoValue = 0
|
||||
} fishingHole;
|
||||
// 26 GAMEOBJECT_TYPE_FLAGDROP
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 eventID; // 1 eventID, References: GameEvents, NoValue = 0
|
||||
uint32 pickupSpell; // 2 pickupSpell, References: Spell, NoValue = 0
|
||||
uint32 noDamageImmune; // 3 noDamageImmune, enum { false, true, }; Default: false
|
||||
uint32 openTextID; // 4 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 playerCast; // 5 playerCast, enum { false, true, }; Default: false
|
||||
uint32 ExpireDuration; // 6 Expire Duration, int, Min value: 0, Max value: 60000, Default value: 10000
|
||||
uint32 GiganticAOI; // 7 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 InfiniteAOI; // 8 Infinite AOI, enum { false, true, }; Default: false
|
||||
uint32 cooldown; // 9 cooldown, int, Min value: 0, Max value: 2147483647, Default value: 3000
|
||||
} flagDrop;
|
||||
// 27 GAMEOBJECT_TYPE_MINI_GAME
|
||||
struct
|
||||
{
|
||||
} miniGame;
|
||||
// 28 GAMEOBJECT_TYPE_DO_NOT_USE_2
|
||||
struct
|
||||
{
|
||||
} DONOTUSE2;
|
||||
// 29 GAMEOBJECT_TYPE_CONTROL_ZONE
|
||||
struct
|
||||
{
|
||||
uint32 radius; // 0 radius, int, Min value: 0, Max value: 100, Default value: 10
|
||||
uint32 spell; // 1 spell, References: Spell, NoValue = 0
|
||||
uint32 worldState1; // 2 worldState1, References: WorldState, NoValue = 0
|
||||
uint32 worldstate2; // 3 worldstate2, References: WorldState, NoValue = 0
|
||||
uint32 CaptureEventHorde; // 4 Capture Event (Horde), References: GameEvents, NoValue = 0
|
||||
uint32 CaptureEventAlliance; // 5 Capture Event (Alliance), References: GameEvents, NoValue = 0
|
||||
uint32 ContestedEventHorde; // 6 Contested Event (Horde), References: GameEvents, NoValue = 0
|
||||
uint32 ContestedEventAlliance; // 7 Contested Event (Alliance), References: GameEvents, NoValue = 0
|
||||
uint32 ProgressEventHorde; // 8 Progress Event (Horde), References: GameEvents, NoValue = 0
|
||||
uint32 ProgressEventAlliance; // 9 Progress Event (Alliance), References: GameEvents, NoValue = 0
|
||||
uint32 NeutralEventHorde; // 10 Neutral Event (Horde), References: GameEvents, NoValue = 0
|
||||
uint32 NeutralEventAlliance; // 11 Neutral Event (Alliance), References: GameEvents, NoValue = 0
|
||||
uint32 neutralPercent; // 12 neutralPercent, int, Min value: 0, Max value: 100, Default value: 0
|
||||
uint32 worldstate3; // 13 worldstate3, References: WorldState, NoValue = 0
|
||||
uint32 minSuperiority; // 14 minSuperiority, int, Min value: 1, Max value: 65535, Default value: 1
|
||||
uint32 maxSuperiority; // 15 maxSuperiority, int, Min value: 1, Max value: 65535, Default value: 1
|
||||
uint32 minTime; // 16 minTime, int, Min value: 1, Max value: 65535, Default value: 1
|
||||
uint32 maxTime; // 17 maxTime, int, Min value: 1, Max value: 65535, Default value: 1
|
||||
uint32 GiganticAOI; // 18 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 highlight; // 19 highlight, enum { false, true, }; Default: true
|
||||
uint32 startingValue; // 20 startingValue, int, Min value: 0, Max value: 100, Default value: 50
|
||||
uint32 unidirectional; // 21 unidirectional, enum { false, true, }; Default: false
|
||||
uint32 killbonustime; // 22 kill bonus time %, int, Min value: 0, Max value: 100, Default value: 0
|
||||
uint32 speedWorldState1; // 23 speedWorldState1, References: WorldState, NoValue = 0
|
||||
uint32 speedWorldState2; // 24 speedWorldState2, References: WorldState, NoValue = 0
|
||||
uint32 UncontestedTime; // 25 Uncontested Time, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 FrequentHeartbeat; // 26 Frequent Heartbeat, enum { false, true, }; Default: false
|
||||
} controlZone;
|
||||
// 30 GAMEOBJECT_TYPE_AURA_GENERATOR
|
||||
struct
|
||||
{
|
||||
uint32 startOpen; // 0 startOpen, enum { false, true, }; Default: true
|
||||
uint32 radius; // 1 radius, int, Min value: 0, Max value: 100, Default value: 10
|
||||
uint32 auraID1; // 2 auraID1, References: Spell, NoValue = 0
|
||||
uint32 conditionID1; // 3 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 auraID2; // 4 auraID2, References: Spell, NoValue = 0
|
||||
uint32 conditionID2; // 5 conditionID2, References: PlayerCondition, NoValue = 0
|
||||
uint32 serverOnly; // 6 serverOnly, enum { false, true, }; Default: false
|
||||
} auraGenerator;
|
||||
// 31 GAMEOBJECT_TYPE_DUNGEON_DIFFICULTY
|
||||
struct
|
||||
{
|
||||
uint32 InstanceType; // 0 Instance Type, enum { Not Instanced, Party Dungeon, Raid Dungeon, PVP Battlefield, Arena Battlefield, Scenario, }; Default: Party Dungeon
|
||||
uint32 DifficultyNormal; // 1 Difficulty Normal, References: animationdata, NoValue = 0
|
||||
uint32 DifficultyHeroic; // 2 Difficulty Heroic, References: animationdata, NoValue = 0
|
||||
uint32 DifficultyEpic; // 3 Difficulty Epic, References: animationdata, NoValue = 0
|
||||
uint32 DifficultyLegendary; // 4 Difficulty Legendary, References: animationdata, NoValue = 0
|
||||
uint32 HeroicAttachment; // 5 Heroic Attachment, References: gameobjectdisplayinfo, NoValue = 0
|
||||
uint32 ChallengeAttachment; // 6 Challenge Attachment, References: gameobjectdisplayinfo, NoValue = 0
|
||||
uint32 DifficultyAnimations; // 7 Difficulty Animations, References: GameObjectDiffAnim, NoValue = 0
|
||||
uint32 LargeAOI; // 8 Large AOI, enum { false, true, }; Default: false
|
||||
uint32 GiganticAOI; // 9 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 Legacy; // 10 Legacy, enum { false, true, }; Default: false
|
||||
} dungeonDifficulty;
|
||||
// 32 GAMEOBJECT_TYPE_BARBER_CHAIR
|
||||
struct
|
||||
{
|
||||
uint32 chairheight; // 0 chairheight, int, Min value: 0, Max value: 2, Default value: 1
|
||||
int32 HeightOffset; // 1 Height Offset (inches), int, Min value: -100, Max value: 100, Default value: 0
|
||||
uint32 SitAnimKit; // 2 Sit Anim Kit, References: AnimKit, NoValue = 0
|
||||
} barberChair;
|
||||
// 33 GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING
|
||||
struct
|
||||
{
|
||||
int32 Unused; // 0 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
uint32 CreditProxyCreature; // 1 Credit Proxy Creature, References: Creature, NoValue = 0
|
||||
uint32 HealthRec; // 2 Health Rec, References: DestructibleHitpoint, NoValue = 0
|
||||
uint32 IntactEvent; // 3 Intact Event, References: GameEvents, NoValue = 0
|
||||
uint32 PVPEnabling; // 4 PVP Enabling, enum { false, true, }; Default: false
|
||||
uint32 InteriorVisible; // 5 Interior Visible, enum { false, true, }; Default: false
|
||||
uint32 InteriorLight; // 6 Interior Light, enum { false, true, }; Default: false
|
||||
int32 Unused1; // 7 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
int32 Unused2; // 8 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
uint32 DamagedEvent; // 9 Damaged Event, References: GameEvents, NoValue = 0
|
||||
int32 Unused3; // 10 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
int32 Unused4; // 11 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
int32 Unused5; // 12 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
int32 Unused6; // 13 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
uint32 DestroyedEvent; // 14 Destroyed Event, References: GameEvents, NoValue = 0
|
||||
int32 Unused7; // 15 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
uint32 RebuildingTime; // 16 Rebuilding: Time (secs), int, Min value: 0, Max value: 65535, Default value: 0
|
||||
int32 Unused8; // 17 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
uint32 DestructibleModelRec; // 18 Destructible Model Rec, References: DestructibleModelData, NoValue = 0
|
||||
uint32 RebuildingEvent; // 19 Rebuilding: Event, References: GameEvents, NoValue = 0
|
||||
int32 Unused9; // 20 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
int32 Unused10; // 21 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
uint32 DamageEvent; // 22 Damage Event, References: GameEvents, NoValue = 0
|
||||
} destructibleBuilding;
|
||||
// 34 GAMEOBJECT_TYPE_GUILD_BANK
|
||||
struct
|
||||
{
|
||||
uint32 conditionID1; // 0 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
} guildbank;
|
||||
// 35 GAMEOBJECT_TYPE_TRAPDOOR
|
||||
struct
|
||||
{
|
||||
uint32 AutoLink; // 0 Auto Link, enum { false, true, }; Default: false
|
||||
uint32 startOpen; // 1 startOpen, enum { false, true, }; Default: false
|
||||
uint32 autoClose; // 2 autoClose (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 BlocksPathsDown; // 3 Blocks Paths Down, enum { false, true, }; Default: false
|
||||
uint32 PathBlockerBump; // 4 Path Blocker Bump (ft), int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
} trapdoor;
|
||||
// 36 GAMEOBJECT_TYPE_NEW_FLAG
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 pickupSpell; // 1 pickupSpell, References: Spell, NoValue = 0
|
||||
uint32 openTextID; // 2 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 requireLOS; // 3 require LOS, enum { false, true, }; Default: true
|
||||
uint32 conditionID1; // 4 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 GiganticAOI; // 5 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 InfiniteAOI; // 6 Infinite AOI, enum { false, true, }; Default: false
|
||||
uint32 ExpireDuration; // 7 Expire Duration, int, Min value: 0, Max value: 3600000, Default value: 10000
|
||||
uint32 RespawnTime; // 8 Respawn Time, int, Min value: 0, Max value: 3600000, Default value: 20000
|
||||
uint32 FlagDrop; // 9 Flag Drop, References: GameObjects, NoValue = 0
|
||||
int32 ExclusiveCategory; // 10 Exclusive Category (BGs Only), int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
uint32 worldState1; // 11 worldState1, References: WorldState, NoValue = 0
|
||||
uint32 ReturnonDefenderInteract; // 12 Return on Defender Interact, enum { false, true, }; Default: false
|
||||
} newflag;
|
||||
// 37 GAMEOBJECT_TYPE_NEW_FLAG_DROP
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
} newflagdrop;
|
||||
// 38 GAMEOBJECT_TYPE_GARRISON_BUILDING
|
||||
struct
|
||||
{
|
||||
int32 SpawnMap; // 0 Spawn Map, References: Map, NoValue = -1
|
||||
} garrisonBuilding;
|
||||
// 39 GAMEOBJECT_TYPE_GARRISON_PLOT
|
||||
struct
|
||||
{
|
||||
uint32 PlotInstance; // 0 Plot Instance, References: GarrPlotInstance, NoValue = 0
|
||||
int32 SpawnMap; // 1 Spawn Map, References: Map, NoValue = -1
|
||||
} garrisonPlot;
|
||||
// 40 GAMEOBJECT_TYPE_CLIENT_CREATURE
|
||||
struct
|
||||
{
|
||||
uint32 CreatureDisplayInfo; // 0 Creature Display Info, References: CreatureDisplayInfo, NoValue = 0
|
||||
uint32 AnimKit; // 1 Anim Kit, References: AnimKit, NoValue = 0
|
||||
uint32 creatureID; // 2 creatureID, References: Creature, NoValue = 0
|
||||
} clientCreature;
|
||||
// 41 GAMEOBJECT_TYPE_CLIENT_ITEM
|
||||
struct
|
||||
{
|
||||
uint32 Item; // 0 Item, References: Item, NoValue = 0
|
||||
} clientItem;
|
||||
// 42 GAMEOBJECT_TYPE_CAPTURE_POINT
|
||||
struct
|
||||
{
|
||||
uint32 CaptureTime; // 0 Capture Time (ms), int, Min value: 0, Max value: 2147483647, Default value: 60000
|
||||
uint32 GiganticAOI; // 1 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 highlight; // 2 highlight, enum { false, true, }; Default: true
|
||||
uint32 open; // 3 open, References: Lock_, NoValue = 0
|
||||
uint32 AssaultBroadcastHorde; // 4 Assault Broadcast (Horde), References: BroadcastText, NoValue = 0
|
||||
uint32 CaptureBroadcastHorde; // 5 Capture Broadcast (Horde), References: BroadcastText, NoValue = 0
|
||||
uint32 DefendedBroadcastHorde; // 6 Defended Broadcast (Horde), References: BroadcastText, NoValue = 0
|
||||
uint32 AssaultBroadcastAlliance; // 7 Assault Broadcast (Alliance), References: BroadcastText, NoValue = 0
|
||||
uint32 CaptureBroadcastAlliance; // 8 Capture Broadcast (Alliance), References: BroadcastText, NoValue = 0
|
||||
uint32 DefendedBroadcastAlliance; // 9 Defended Broadcast (Alliance), References: BroadcastText, NoValue = 0
|
||||
uint32 worldState1; // 10 worldState1, References: WorldState, NoValue = 0
|
||||
uint32 ContestedEventHorde; // 11 Contested Event (Horde), References: GameEvents, NoValue = 0
|
||||
uint32 CaptureEventHorde; // 12 Capture Event (Horde), References: GameEvents, NoValue = 0
|
||||
uint32 DefendedEventHorde; // 13 Defended Event (Horde), References: GameEvents, NoValue = 0
|
||||
uint32 ContestedEventAlliance; // 14 Contested Event (Alliance), References: GameEvents, NoValue = 0
|
||||
uint32 CaptureEventAlliance; // 15 Capture Event (Alliance), References: GameEvents, NoValue = 0
|
||||
uint32 DefendedEventAlliance; // 16 Defended Event (Alliance), References: GameEvents, NoValue = 0
|
||||
uint32 SpellVisual1; // 17 Spell Visual 1, References: SpellVisual, NoValue = 0
|
||||
uint32 SpellVisual2; // 18 Spell Visual 2, References: SpellVisual, NoValue = 0
|
||||
uint32 SpellVisual3; // 19 Spell Visual 3, References: SpellVisual, NoValue = 0
|
||||
uint32 SpellVisual4; // 20 Spell Visual 4, References: SpellVisual, NoValue = 0
|
||||
uint32 SpellVisual5; // 21 Spell Visual 5, References: SpellVisual, NoValue = 0
|
||||
} capturePoint;
|
||||
// 43 GAMEOBJECT_TYPE_PHASEABLE_MO
|
||||
struct
|
||||
{
|
||||
int32 SpawnMap; // 0 Spawn Map, References: Map, NoValue = -1
|
||||
uint32 AreaNameSet; // 1 Area Name Set (Index), int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
uint32 DoodadSetA; // 2 Doodad Set A, int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 DoodadSetB; // 3 Doodad Set B, int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
} phaseableMO;
|
||||
// 44 GAMEOBJECT_TYPE_GARRISON_MONUMENT
|
||||
struct
|
||||
{
|
||||
uint32 TrophyTypeID; // 0 Trophy Type ID, References: TrophyType, NoValue = 0
|
||||
uint32 TrophyInstanceID; // 1 Trophy Instance ID, References: TrophyInstance, NoValue = 0
|
||||
} garrisonMonument;
|
||||
// 45 GAMEOBJECT_TYPE_GARRISON_SHIPMENT
|
||||
struct
|
||||
{
|
||||
uint32 ShipmentContainer; // 0 Shipment Container, References: CharShipmentContainer, NoValue = 0
|
||||
uint32 GiganticAOI; // 1 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 LargeAOI; // 2 Large AOI, enum { false, true, }; Default: false
|
||||
} garrisonShipment;
|
||||
// 46 GAMEOBJECT_TYPE_GARRISON_MONUMENT_PLAQUE
|
||||
struct
|
||||
{
|
||||
uint32 TrophyInstanceID; // 0 Trophy Instance ID, References: TrophyInstance, NoValue = 0
|
||||
} garrisonMonumentPlaque;
|
||||
// 47 GAMEOBJECT_TYPE_ARTIFACT_FORGE
|
||||
struct
|
||||
{
|
||||
uint32 conditionID1; // 0 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 LargeAOI; // 1 Large AOI, enum { false, true, }; Default: false
|
||||
uint32 IgnoreBoundingBox; // 2 Ignore Bounding Box, enum { false, true, }; Default: false
|
||||
uint32 CameraMode; // 3 Camera Mode, References: CameraMode, NoValue = 0
|
||||
uint32 FadeRegionRadius; // 4 Fade Region Radius, int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
} artifactForge;
|
||||
// 48 GAMEOBJECT_TYPE_UI_LINK
|
||||
struct
|
||||
{
|
||||
uint32 UILinkType; // 0 UI Link Type, enum { Adventure Journal, Obliterum Forge, }; Default: Adventure Journal
|
||||
uint32 allowMounted; // 1 allowMounted, enum { false, true, }; Default: false
|
||||
uint32 GiganticAOI; // 2 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 spellFocusType; // 3 spellFocusType, References: SpellFocusObject, NoValue = 0
|
||||
uint32 radius; // 4 radius, int, Min value: 0, Max value: 50, Default value: 10
|
||||
} UILink;
|
||||
// 49 GAMEOBJECT_TYPE_KEYSTONE_RECEPTACLE
|
||||
struct
|
||||
{
|
||||
} KeystoneReceptacle;
|
||||
// 50 GAMEOBJECT_TYPE_GATHERING_NODE
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 chestLoot; // 1 chestLoot, References: Treasure, NoValue = 0
|
||||
uint32 level; // 2 level, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 notInCombat; // 3 notInCombat, enum { false, true, }; Default: false
|
||||
uint32 trivialSkillLow; // 4 trivialSkillLow, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 trivialSkillHigh; // 5 trivialSkillHigh, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 ObjectDespawnDelay; // 6 Object Despawn Delay, int, Min value: 0, Max value: 600, Default value: 15
|
||||
uint32 triggeredEvent; // 7 triggeredEvent, References: GameEvents, NoValue = 0
|
||||
uint32 requireLOS; // 8 require LOS, enum { false, true, }; Default: false
|
||||
uint32 openTextID; // 9 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 floatingTooltip; // 10 floatingTooltip, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 11 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 xpLevel; // 12 xpLevel, int, Min value: -1, Max value: 123, Default value: 0
|
||||
uint32 xpDifficulty; // 13 xpDifficulty, enum { No Exp, Trivial, Very Small, Small, Substandard, Standard, High, Epic, Dungeon, 5, }; Default: No Exp
|
||||
uint32 spell; // 14 spell, References: Spell, NoValue = 0
|
||||
uint32 GiganticAOI; // 15 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 LargeAOI; // 16 Large AOI, enum { false, true, }; Default: false
|
||||
uint32 SpawnVignette; // 17 Spawn Vignette, References: vignette, NoValue = 0
|
||||
uint32 MaxNumberofLoots; // 18 Max Number of Loots, int, Min value: 1, Max value: 40, Default value: 10
|
||||
uint32 logloot; // 19 log loot, enum { false, true, }; Default: false
|
||||
uint32 linkedTrap; // 20 linkedTrap, References: GameObjects, NoValue = 0
|
||||
} gatheringNode;
|
||||
// 51 GAMEOBJECT_TYPE_CHALLENGE_MODE_REWARD
|
||||
struct
|
||||
{
|
||||
uint32 chestLoot; // 0 chestLoot, References: Treasure, NoValue = 0
|
||||
uint32 WhenAvailable; // 1 When Available, References: GameObjectDisplayInfo, NoValue = 0
|
||||
} challengeModeReward;
|
||||
struct
|
||||
{
|
||||
uint32 data[MAX_GAMEOBJECT_DATA];
|
||||
} raw;
|
||||
};
|
||||
|
||||
std::string AIName;
|
||||
uint32 ScriptId;
|
||||
|
||||
// helpers
|
||||
bool IsDespawnAtAction() const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_CHEST: return chest.consumable != 0;
|
||||
case GAMEOBJECT_TYPE_GOOBER: return goober.consumable != 0;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool IsUsableMounted() const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_QUESTGIVER: return questgiver.allowMounted != 0;
|
||||
case GAMEOBJECT_TYPE_TEXT: return text.allowMounted != 0;
|
||||
case GAMEOBJECT_TYPE_GOOBER: return goober.allowMounted != 0;
|
||||
case GAMEOBJECT_TYPE_SPELLCASTER: return spellCaster.allowMounted != 0;
|
||||
case GAMEOBJECT_TYPE_UI_LINK: return UILink.allowMounted != 0;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetLockId() const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_DOOR: return door.open;
|
||||
case GAMEOBJECT_TYPE_BUTTON: return button.open;
|
||||
case GAMEOBJECT_TYPE_QUESTGIVER: return questgiver.open;
|
||||
case GAMEOBJECT_TYPE_CHEST: return chest.open;
|
||||
case GAMEOBJECT_TYPE_TRAP: return trap.open;
|
||||
case GAMEOBJECT_TYPE_GOOBER: return goober.open;
|
||||
case GAMEOBJECT_TYPE_AREADAMAGE: return areaDamage.open;
|
||||
case GAMEOBJECT_TYPE_CAMERA: return camera.open;
|
||||
case GAMEOBJECT_TYPE_FLAGSTAND: return flagStand.open;
|
||||
case GAMEOBJECT_TYPE_FISHINGHOLE: return fishingHole.open;
|
||||
case GAMEOBJECT_TYPE_FLAGDROP: return flagDrop.open;
|
||||
case GAMEOBJECT_TYPE_NEW_FLAG: return newflag.open;
|
||||
case GAMEOBJECT_TYPE_NEW_FLAG_DROP: return newflagdrop.open;
|
||||
case GAMEOBJECT_TYPE_CAPTURE_POINT: return capturePoint.open;
|
||||
case GAMEOBJECT_TYPE_GATHERING_NODE: return gatheringNode.open;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool GetDespawnPossibility() const // despawn at targeting of cast?
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_DOOR: return door.noDamageImmune != 0;
|
||||
case GAMEOBJECT_TYPE_BUTTON: return button.noDamageImmune != 0;
|
||||
case GAMEOBJECT_TYPE_QUESTGIVER: return questgiver.noDamageImmune != 0;
|
||||
case GAMEOBJECT_TYPE_GOOBER: return goober.noDamageImmune != 0;
|
||||
case GAMEOBJECT_TYPE_FLAGSTAND: return flagStand.noDamageImmune != 0;
|
||||
case GAMEOBJECT_TYPE_FLAGDROP: return flagDrop.noDamageImmune != 0;
|
||||
default: return true;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetCharges() const // despawn at uses amount
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
//case GAMEOBJECT_TYPE_TRAP: return trap.charges;
|
||||
case GAMEOBJECT_TYPE_GUARDPOST: return guardPost.charges;
|
||||
case GAMEOBJECT_TYPE_SPELLCASTER: return spellCaster.charges;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetLinkedGameObjectEntry() const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_BUTTON: return button.linkedTrap;
|
||||
case GAMEOBJECT_TYPE_CHEST: return chest.linkedTrap;
|
||||
case GAMEOBJECT_TYPE_SPELL_FOCUS: return spellFocus.linkedTrap;
|
||||
case GAMEOBJECT_TYPE_GOOBER: return goober.linkedTrap;
|
||||
case GAMEOBJECT_TYPE_GATHERING_NODE: return gatheringNode.linkedTrap;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetAutoCloseTime() const
|
||||
{
|
||||
uint32 autoCloseTime = 0;
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_DOOR: autoCloseTime = door.autoClose; break;
|
||||
case GAMEOBJECT_TYPE_BUTTON: autoCloseTime = button.autoClose; break;
|
||||
case GAMEOBJECT_TYPE_TRAP: autoCloseTime = trap.autoClose; break;
|
||||
case GAMEOBJECT_TYPE_GOOBER: autoCloseTime = goober.autoClose; break;
|
||||
case GAMEOBJECT_TYPE_TRANSPORT: autoCloseTime = transport.autoClose; break;
|
||||
case GAMEOBJECT_TYPE_AREADAMAGE: autoCloseTime = areaDamage.autoClose; break;
|
||||
case GAMEOBJECT_TYPE_TRAPDOOR: autoCloseTime = trapdoor.autoClose; break;
|
||||
default: break;
|
||||
}
|
||||
return autoCloseTime / IN_MILLISECONDS; // prior to 3.0.3, conversion was / 0x10000;
|
||||
}
|
||||
|
||||
uint32 GetLootId() const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_CHEST: return chest.chestLoot;
|
||||
case GAMEOBJECT_TYPE_FISHINGHOLE: return fishingHole.chestLoot;
|
||||
case GAMEOBJECT_TYPE_GATHERING_NODE: return gatheringNode.chestLoot;
|
||||
case GAMEOBJECT_TYPE_CHALLENGE_MODE_REWARD: return challengeModeReward.chestLoot;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetGossipMenuId() const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_QUESTGIVER: return questgiver.gossipID;
|
||||
case GAMEOBJECT_TYPE_GOOBER: return goober.gossipID;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetEventScriptId() const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_GOOBER: return goober.eventID;
|
||||
case GAMEOBJECT_TYPE_CHEST: return chest.triggeredEvent;
|
||||
case GAMEOBJECT_TYPE_CAMERA: return camera.eventID;
|
||||
case GAMEOBJECT_TYPE_GATHERING_NODE: return gatheringNode.triggeredEvent;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetCooldown() const // Cooldown preventing goober and traps to cast spell
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_TRAP: return trap.cooldown;
|
||||
case GAMEOBJECT_TYPE_GOOBER: return goober.cooldown;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// From `gameobject_template_addon`
|
||||
struct GameObjectTemplateAddon
|
||||
{
|
||||
uint32 entry;
|
||||
uint32 faction;
|
||||
uint32 flags;
|
||||
uint32 mingold;
|
||||
uint32 maxgold;
|
||||
};
|
||||
|
||||
// Benchmarked: Faster than std::map (insert/find)
|
||||
typedef std::unordered_map<uint32, GameObjectTemplate> GameObjectTemplateContainer;
|
||||
typedef std::unordered_map<uint32, GameObjectTemplateAddon> GameObjectTemplateAddonContainer;
|
||||
|
||||
class OPvPCapturePoint;
|
||||
class Transport;
|
||||
class Unit;
|
||||
struct TransportAnimation;
|
||||
enum TriggerCastFlags : uint32;
|
||||
|
||||
union GameObjectValue
|
||||
{
|
||||
@@ -863,60 +64,6 @@ union GameObjectValue
|
||||
} Building;
|
||||
};
|
||||
|
||||
struct GameObjectLocale
|
||||
{
|
||||
std::vector<std::string> Name;
|
||||
std::vector<std::string> CastBarCaption;
|
||||
std::vector<std::string> Unk1;
|
||||
};
|
||||
|
||||
struct QuaternionData
|
||||
{
|
||||
float x, y, z, w;
|
||||
|
||||
QuaternionData() : x(0.0f), y(0.0f), z(0.0f), w(1.0f) {}
|
||||
QuaternionData(float X, float Y, float Z, float W) : x(X), y(Y), z(Z), w(W) {}
|
||||
|
||||
bool isUnit() const { return fabs(x * x + y * y + z * z + w * w - 1.0f) < 1e-5; }
|
||||
};
|
||||
|
||||
// `gameobject_addon` table
|
||||
struct GameObjectAddon
|
||||
{
|
||||
QuaternionData ParentRotation;
|
||||
InvisibilityType invisibilityType;
|
||||
uint32 InvisibilityValue;
|
||||
};
|
||||
|
||||
typedef std::unordered_map<ObjectGuid::LowType, GameObjectAddon> GameObjectAddonContainer;
|
||||
|
||||
// from `gameobject`
|
||||
struct GameObjectData
|
||||
{
|
||||
explicit GameObjectData() : id(0), mapid(0), phaseMask(0), posX(0.0f), posY(0.0f), posZ(0.0f), orientation(0.0f), spawntimesecs(0),
|
||||
animprogress(0), go_state(GO_STATE_ACTIVE), spawnMask(0), artKit(0), phaseid(0), phaseGroup(0), dbData(true) { }
|
||||
uint32 id; // entry in gamobject_template
|
||||
uint16 mapid;
|
||||
uint32 phaseMask;
|
||||
float posX;
|
||||
float posY;
|
||||
float posZ;
|
||||
float orientation;
|
||||
QuaternionData rotation;
|
||||
int32 spawntimesecs;
|
||||
uint32 animprogress;
|
||||
GOState go_state;
|
||||
uint32 spawnMask;
|
||||
uint8 artKit;
|
||||
uint32 phaseid;
|
||||
uint32 phaseGroup;
|
||||
uint32 ScriptId;
|
||||
bool dbData;
|
||||
};
|
||||
|
||||
typedef std::vector<uint32> GameObjectQuestItemList;
|
||||
typedef std::unordered_map<uint32, GameObjectQuestItemList> GameObjectQuestItemMap;
|
||||
|
||||
// For containers: [GO_NOT_READY]->GO_READY (close)->GO_ACTIVATED (open) ->GO_JUST_DEACTIVATED->GO_READY -> ...
|
||||
// For bobber: GO_NOT_READY ->GO_READY (close)->GO_ACTIVATED (open) ->GO_JUST_DEACTIVATED-><deleted>
|
||||
// For door(closed):[GO_NOT_READY]->GO_READY (close)->GO_ACTIVATED (open) ->GO_JUST_DEACTIVATED->GO_READY(close) -> ...
|
||||
@@ -929,9 +76,6 @@ enum LootState
|
||||
GO_JUST_DEACTIVATED
|
||||
};
|
||||
|
||||
class Unit;
|
||||
class GameObjectModel;
|
||||
|
||||
// 5 sec for bobber catch
|
||||
#define FISHING_BOBBER_READY_TIME 5
|
||||
|
||||
|
||||
@@ -0,0 +1,873 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2017 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 GameObjectData_h__
|
||||
#define GameObjectData_h__
|
||||
|
||||
#include "Common.h"
|
||||
#include "SharedDefines.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// from `gameobject_template`
|
||||
struct GameObjectTemplate
|
||||
{
|
||||
uint32 entry;
|
||||
uint32 type;
|
||||
uint32 displayId;
|
||||
std::string name;
|
||||
std::string IconName;
|
||||
std::string castBarCaption;
|
||||
std::string unk1;
|
||||
float size;
|
||||
int32 RequiredLevel;
|
||||
union
|
||||
{
|
||||
// 0 GAMEOBJECT_TYPE_DOOR
|
||||
struct
|
||||
{
|
||||
uint32 startOpen; // 0 startOpen, enum { false, true, }; Default: false
|
||||
uint32 open; // 1 open, References: Lock_, NoValue = 0
|
||||
uint32 autoClose; // 2 autoClose (ms), int, Min value: 0, Max value: 2147483647, Default value: 3000
|
||||
uint32 noDamageImmune; // 3 noDamageImmune, enum { false, true, }; Default: false
|
||||
uint32 openTextID; // 4 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 closeTextID; // 5 closeTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 IgnoredByPathing; // 6 Ignored By Pathing, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 7 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 DoorisOpaque; // 8 Door is Opaque (Disable portal on close), enum { false, true, }; Default: true
|
||||
uint32 GiganticAOI; // 9 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 InfiniteAOI; // 10 Infinite AOI, enum { false, true, }; Default: false
|
||||
} door;
|
||||
// 1 GAMEOBJECT_TYPE_BUTTON
|
||||
struct
|
||||
{
|
||||
uint32 startOpen; // 0 startOpen, enum { false, true, }; Default: false
|
||||
uint32 open; // 1 open, References: Lock_, NoValue = 0
|
||||
uint32 autoClose; // 2 autoClose (ms), int, Min value: 0, Max value: 2147483647, Default value: 3000
|
||||
uint32 linkedTrap; // 3 linkedTrap, References: GameObjects, NoValue = 0
|
||||
uint32 noDamageImmune; // 4 noDamageImmune, enum { false, true, }; Default: false
|
||||
uint32 GiganticAOI; // 5 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 openTextID; // 6 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 closeTextID; // 7 closeTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 requireLOS; // 8 require LOS, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 9 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
} button;
|
||||
// 2 GAMEOBJECT_TYPE_QUESTGIVER
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 questGiver; // 1 questGiver, References: QuestGiver, NoValue = 0
|
||||
uint32 pageMaterial; // 2 pageMaterial, References: PageTextMaterial, NoValue = 0
|
||||
uint32 gossipID; // 3 gossipID, References: Gossip, NoValue = 0
|
||||
uint32 customAnim; // 4 customAnim, int, Min value: 0, Max value: 4, Default value: 0
|
||||
uint32 noDamageImmune; // 5 noDamageImmune, enum { false, true, }; Default: false
|
||||
uint32 openTextID; // 6 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 requireLOS; // 7 require LOS, enum { false, true, }; Default: false
|
||||
uint32 allowMounted; // 8 allowMounted, enum { false, true, }; Default: false
|
||||
uint32 GiganticAOI; // 9 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 10 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 NeverUsableWhileMounted; // 11 Never Usable While Mounted, enum { false, true, }; Default: false
|
||||
} questgiver;
|
||||
// 3 GAMEOBJECT_TYPE_CHEST
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 chestLoot; // 1 chestLoot, References: Treasure, NoValue = 0
|
||||
uint32 chestRestockTime; // 2 chestRestockTime, int, Min value: 0, Max value: 1800000, Default value: 0
|
||||
uint32 consumable; // 3 consumable, enum { false, true, }; Default: false
|
||||
uint32 minRestock; // 4 minRestock, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 maxRestock; // 5 maxRestock, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 triggeredEvent; // 6 triggeredEvent, References: GameEvents, NoValue = 0
|
||||
uint32 linkedTrap; // 7 linkedTrap, References: GameObjects, NoValue = 0
|
||||
uint32 questID; // 8 questID, References: QuestV2, NoValue = 0
|
||||
uint32 level; // 9 level, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 requireLOS; // 10 require LOS, enum { false, true, }; Default: false
|
||||
uint32 leaveLoot; // 11 leaveLoot, enum { false, true, }; Default: false
|
||||
uint32 notInCombat; // 12 notInCombat, enum { false, true, }; Default: false
|
||||
uint32 logloot; // 13 log loot, enum { false, true, }; Default: false
|
||||
uint32 openTextID; // 14 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 usegrouplootrules; // 15 use group loot rules, enum { false, true, }; Default: false
|
||||
uint32 floatingTooltip; // 16 floatingTooltip, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 17 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
int32 xpLevel; // 18 xpLevel, int, Min value: -1, Max value: 123, Default value: 0
|
||||
uint32 xpDifficulty; // 19 xpDifficulty, enum { No Exp, Trivial, Very Small, Small, Substandard, Standard, High, Epic, Dungeon, 5, }; Default: No Exp
|
||||
uint32 lootLevel; // 20 lootLevel, int, Min value: 0, Max value: 123, Default value: 0
|
||||
uint32 GroupXP; // 21 Group XP, enum { false, true, }; Default: false
|
||||
uint32 DamageImmuneOK; // 22 Damage Immune OK, enum { false, true, }; Default: false
|
||||
uint32 trivialSkillLow; // 23 trivialSkillLow, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 trivialSkillHigh; // 24 trivialSkillHigh, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 DungeonEncounter; // 25 Dungeon Encounter, References: DungeonEncounter, NoValue = 0
|
||||
uint32 spell; // 26 spell, References: Spell, NoValue = 0
|
||||
uint32 GiganticAOI; // 27 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 LargeAOI; // 28 Large AOI, enum { false, true, }; Default: false
|
||||
uint32 SpawnVignette; // 29 Spawn Vignette, References: vignette, NoValue = 0
|
||||
uint32 chestPersonalLoot; // 30 chest Personal Loot, References: Treasure, NoValue = 0
|
||||
uint32 turnpersonallootsecurityoff; // 31 turn personal loot security off, enum { false, true, }; Default: false
|
||||
uint32 ChestProperties; // 32 Chest Properties, References: ChestProperties, NoValue = 0
|
||||
} chest;
|
||||
// 4 GAMEOBJECT_TYPE_BINDER
|
||||
struct
|
||||
{
|
||||
} binder;
|
||||
// 5 GAMEOBJECT_TYPE_GENERIC
|
||||
struct
|
||||
{
|
||||
uint32 floatingTooltip; // 0 floatingTooltip, enum { false, true, }; Default: false
|
||||
uint32 highlight; // 1 highlight, enum { false, true, }; Default: true
|
||||
uint32 serverOnly; // 2 serverOnly, enum { false, true, }; Default: false
|
||||
uint32 GiganticAOI; // 3 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 floatOnWater; // 4 floatOnWater, enum { false, true, }; Default: false
|
||||
uint32 questID; // 5 questID, References: QuestV2, NoValue = 0
|
||||
uint32 conditionID1; // 6 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 LargeAOI; // 7 Large AOI, enum { false, true, }; Default: false
|
||||
uint32 UseGarrisonOwnerGuildColors; // 8 Use Garrison Owner Guild Colors, enum { false, true, }; Default: false
|
||||
} generic;
|
||||
// 6 GAMEOBJECT_TYPE_TRAP
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 level; // 1 level, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 radius; // 2 radius, int, Min value: 0, Max value: 100, Default value: 0
|
||||
uint32 spell; // 3 spell, References: Spell, NoValue = 0
|
||||
uint32 charges; // 4 charges, int, Min value: 0, Max value: 65535, Default value: 1
|
||||
uint32 cooldown; // 5 cooldown, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 autoClose; // 6 autoClose (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 startDelay; // 7 startDelay, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 serverOnly; // 8 serverOnly, enum { false, true, }; Default: false
|
||||
uint32 stealthed; // 9 stealthed, enum { false, true, }; Default: false
|
||||
uint32 GiganticAOI; // 10 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 stealthAffected; // 11 stealthAffected, enum { false, true, }; Default: false
|
||||
uint32 openTextID; // 12 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 closeTextID; // 13 closeTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 IgnoreTotems; // 14 Ignore Totems, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 15 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 playerCast; // 16 playerCast, enum { false, true, }; Default: false
|
||||
uint32 SummonerTriggered; // 17 Summoner Triggered, enum { false, true, }; Default: false
|
||||
uint32 requireLOS; // 18 require LOS, enum { false, true, }; Default: false
|
||||
} trap;
|
||||
// 7 GAMEOBJECT_TYPE_CHAIR
|
||||
struct
|
||||
{
|
||||
uint32 chairslots; // 0 chairslots, int, Min value: 1, Max value: 5, Default value: 1
|
||||
uint32 chairheight; // 1 chairheight, int, Min value: 0, Max value: 2, Default value: 1
|
||||
uint32 onlyCreatorUse; // 2 onlyCreatorUse, enum { false, true, }; Default: false
|
||||
uint32 triggeredEvent; // 3 triggeredEvent, References: GameEvents, NoValue = 0
|
||||
uint32 conditionID1; // 4 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
} chair;
|
||||
// 8 GAMEOBJECT_TYPE_SPELL_FOCUS
|
||||
struct
|
||||
{
|
||||
uint32 spellFocusType; // 0 spellFocusType, References: SpellFocusObject, NoValue = 0
|
||||
uint32 radius; // 1 radius, int, Min value: 0, Max value: 50, Default value: 10
|
||||
uint32 linkedTrap; // 2 linkedTrap, References: GameObjects, NoValue = 0
|
||||
uint32 serverOnly; // 3 serverOnly, enum { false, true, }; Default: false
|
||||
uint32 questID; // 4 questID, References: QuestV2, NoValue = 0
|
||||
uint32 GiganticAOI; // 5 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 floatingTooltip; // 6 floatingTooltip, enum { false, true, }; Default: false
|
||||
uint32 floatOnWater; // 7 floatOnWater, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 8 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
} spellFocus;
|
||||
// 9 GAMEOBJECT_TYPE_TEXT
|
||||
struct
|
||||
{
|
||||
uint32 pageID; // 0 pageID, References: PageText, NoValue = 0
|
||||
uint32 language; // 1 language, References: Languages, NoValue = 0
|
||||
uint32 pageMaterial; // 2 pageMaterial, References: PageTextMaterial, NoValue = 0
|
||||
uint32 allowMounted; // 3 allowMounted, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 4 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 NeverUsableWhileMounted; // 5 Never Usable While Mounted, enum { false, true, }; Default: false
|
||||
} text;
|
||||
// 10 GAMEOBJECT_TYPE_GOOBER
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 questID; // 1 questID, References: QuestV2, NoValue = 0
|
||||
uint32 eventID; // 2 eventID, References: GameEvents, NoValue = 0
|
||||
uint32 autoClose; // 3 autoClose (ms), int, Min value: 0, Max value: 2147483647, Default value: 3000
|
||||
uint32 customAnim; // 4 customAnim, int, Min value: 0, Max value: 4, Default value: 0
|
||||
uint32 consumable; // 5 consumable, enum { false, true, }; Default: false
|
||||
uint32 cooldown; // 6 cooldown, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 pageID; // 7 pageID, References: PageText, NoValue = 0
|
||||
uint32 language; // 8 language, References: Languages, NoValue = 0
|
||||
uint32 pageMaterial; // 9 pageMaterial, References: PageTextMaterial, NoValue = 0
|
||||
uint32 spell; // 10 spell, References: Spell, NoValue = 0
|
||||
uint32 noDamageImmune; // 11 noDamageImmune, enum { false, true, }; Default: false
|
||||
uint32 linkedTrap; // 12 linkedTrap, References: GameObjects, NoValue = 0
|
||||
uint32 GiganticAOI; // 13 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 openTextID; // 14 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 closeTextID; // 15 closeTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 requireLOS; // 16 require LOS, enum { false, true, }; Default: false
|
||||
uint32 allowMounted; // 17 allowMounted, enum { false, true, }; Default: false
|
||||
uint32 floatingTooltip; // 18 floatingTooltip, enum { false, true, }; Default: false
|
||||
uint32 gossipID; // 19 gossipID, References: Gossip, NoValue = 0
|
||||
uint32 AllowMultiInteract; // 20 Allow Multi-Interact, enum { false, true, }; Default: false
|
||||
uint32 floatOnWater; // 21 floatOnWater, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 22 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 playerCast; // 23 playerCast, enum { false, true, }; Default: false
|
||||
uint32 SpawnVignette; // 24 Spawn Vignette, References: vignette, NoValue = 0
|
||||
uint32 startOpen; // 25 startOpen, enum { false, true, }; Default: false
|
||||
uint32 DontPlayOpenAnim; // 26 Dont Play Open Anim, enum { false, true, }; Default: false
|
||||
uint32 IgnoreBoundingBox; // 27 Ignore Bounding Box, enum { false, true, }; Default: false
|
||||
uint32 NeverUsableWhileMounted; // 28 Never Usable While Mounted, enum { false, true, }; Default: false
|
||||
uint32 SortFarZ; // 29 Sort Far Z, enum { false, true, }; Default: false
|
||||
uint32 SyncAnimationtoObjectLifetime; // 30 Sync Animation to Object Lifetime (global track only), enum { false, true, }; Default: false
|
||||
uint32 NoFuzzyHit; // 31 No Fuzzy Hit, enum { false, true, }; Default: false
|
||||
} goober;
|
||||
// 11 GAMEOBJECT_TYPE_TRANSPORT
|
||||
struct
|
||||
{
|
||||
uint32 Timeto2ndfloor; // 0 Time to 2nd floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 startOpen; // 1 startOpen, enum { false, true, }; Default: false
|
||||
uint32 autoClose; // 2 autoClose (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Reached1stfloor; // 3 Reached 1st floor, References: GameEvents, NoValue = 0
|
||||
uint32 Reached2ndfloor; // 4 Reached 2nd floor, References: GameEvents, NoValue = 0
|
||||
int32 SpawnMap; // 5 Spawn Map, References: Map, NoValue = -1
|
||||
uint32 Timeto3rdfloor; // 6 Time to 3rd floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Reached3rdfloor; // 7 Reached 3rd floor, References: GameEvents, NoValue = 0
|
||||
uint32 Timeto4thfloor; // 8 Time to 4th floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Reached4thfloor; // 9 Reached 4th floor, References: GameEvents, NoValue = 0
|
||||
uint32 Timeto5thfloor; // 10 Time to 5th floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Reached5thfloor; // 11 Reached 5th floor, References: GameEvents, NoValue = 0
|
||||
uint32 Timeto6thfloor; // 12 Time to 6th floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Reached6thfloor; // 13 Reached 6th floor, References: GameEvents, NoValue = 0
|
||||
uint32 Timeto7thfloor; // 14 Time to 7th floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Reached7thfloor; // 15 Reached 7th floor, References: GameEvents, NoValue = 0
|
||||
uint32 Timeto8thfloor; // 16 Time to 8th floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Reached8thfloor; // 17 Reached 8th floor, References: GameEvents, NoValue = 0
|
||||
uint32 Timeto9thfloor; // 18 Time to 9th floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Reached9thfloor; // 19 Reached 9th floor, References: GameEvents, NoValue = 0
|
||||
uint32 Timeto10thfloor; // 20 Time to 10th floor (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 Reached10thfloor; // 21 Reached 10th floor, References: GameEvents, NoValue = 0
|
||||
uint32 onlychargeheightcheck; // 22 only charge height check. (yards), int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 onlychargetimecheck; // 23 only charge time check, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
} transport;
|
||||
// 12 GAMEOBJECT_TYPE_AREADAMAGE
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 radius; // 1 radius, int, Min value: 0, Max value: 50, Default value: 3
|
||||
uint32 damageMin; // 2 damageMin, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 damageMax; // 3 damageMax, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 damageSchool; // 4 damageSchool, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 autoClose; // 5 autoClose (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 openTextID; // 6 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 closeTextID; // 7 closeTextID, References: BroadcastText, NoValue = 0
|
||||
} areaDamage;
|
||||
// 13 GAMEOBJECT_TYPE_CAMERA
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 camera; // 1 camera, References: CinematicSequences, NoValue = 0
|
||||
uint32 eventID; // 2 eventID, References: GameEvents, NoValue = 0
|
||||
uint32 openTextID; // 3 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 conditionID1; // 4 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
} camera;
|
||||
// 14 GAMEOBJECT_TYPE_MAP_OBJECT
|
||||
struct
|
||||
{
|
||||
} mapobject;
|
||||
// 15 GAMEOBJECT_TYPE_MAP_OBJ_TRANSPORT
|
||||
struct
|
||||
{
|
||||
uint32 taxiPathID; // 0 taxiPathID, References: TaxiPath, NoValue = 0
|
||||
uint32 moveSpeed; // 1 moveSpeed, int, Min value: 1, Max value: 60, Default value: 1
|
||||
uint32 accelRate; // 2 accelRate, int, Min value: 1, Max value: 20, Default value: 1
|
||||
uint32 startEventID; // 3 startEventID, References: GameEvents, NoValue = 0
|
||||
uint32 stopEventID; // 4 stopEventID, References: GameEvents, NoValue = 0
|
||||
uint32 transportPhysics; // 5 transportPhysics, References: TransportPhysics, NoValue = 0
|
||||
int32 SpawnMap; // 6 Spawn Map, References: Map, NoValue = -1
|
||||
uint32 worldState1; // 7 worldState1, References: WorldState, NoValue = 0
|
||||
uint32 allowstopping; // 8 allow stopping, enum { false, true, }; Default: false
|
||||
uint32 InitStopped; // 9 Init Stopped, enum { false, true, }; Default: false
|
||||
uint32 TrueInfiniteAOI; // 10 True Infinite AOI (programmer only!), enum { false, true, }; Default: false
|
||||
} moTransport;
|
||||
// 16 GAMEOBJECT_TYPE_DUEL_ARBITER
|
||||
struct
|
||||
{
|
||||
} duelFlag;
|
||||
// 17 GAMEOBJECT_TYPE_FISHINGNODE
|
||||
struct
|
||||
{
|
||||
} fishingNode;
|
||||
// 18 GAMEOBJECT_TYPE_RITUAL
|
||||
struct
|
||||
{
|
||||
uint32 casters; // 0 casters, int, Min value: 1, Max value: 10, Default value: 1
|
||||
uint32 spell; // 1 spell, References: Spell, NoValue = 0
|
||||
uint32 animSpell; // 2 animSpell, References: Spell, NoValue = 0
|
||||
uint32 ritualPersistent; // 3 ritualPersistent, enum { false, true, }; Default: false
|
||||
uint32 casterTargetSpell; // 4 casterTargetSpell, References: Spell, NoValue = 0
|
||||
uint32 casterTargetSpellTargets; // 5 casterTargetSpellTargets, int, Min value: 1, Max value: 10, Default value: 1
|
||||
uint32 castersGrouped; // 6 castersGrouped, enum { false, true, }; Default: true
|
||||
uint32 ritualNoTargetCheck; // 7 ritualNoTargetCheck, enum { false, true, }; Default: true
|
||||
uint32 conditionID1; // 8 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
} ritual;
|
||||
// 19 GAMEOBJECT_TYPE_MAILBOX
|
||||
struct
|
||||
{
|
||||
uint32 conditionID1; // 0 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
} mailbox;
|
||||
// 20 GAMEOBJECT_TYPE_DO_NOT_USE
|
||||
struct
|
||||
{
|
||||
} DONOTUSE;
|
||||
// 21 GAMEOBJECT_TYPE_GUARDPOST
|
||||
struct
|
||||
{
|
||||
uint32 creatureID; // 0 creatureID, References: Creature, NoValue = 0
|
||||
uint32 charges; // 1 charges, int, Min value: 0, Max value: 65535, Default value: 1
|
||||
} guardPost;
|
||||
// 22 GAMEOBJECT_TYPE_SPELLCASTER
|
||||
struct
|
||||
{
|
||||
uint32 spell; // 0 spell, References: Spell, NoValue = 0
|
||||
int32 charges; // 1 charges, int, Min value: -1, Max value: 65535, Default value: 1
|
||||
uint32 partyOnly; // 2 partyOnly, enum { false, true, }; Default: false
|
||||
uint32 allowMounted; // 3 allowMounted, enum { false, true, }; Default: false
|
||||
uint32 GiganticAOI; // 4 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 5 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 playerCast; // 6 playerCast, enum { false, true, }; Default: false
|
||||
uint32 NeverUsableWhileMounted; // 7 Never Usable While Mounted, enum { false, true, }; Default: false
|
||||
} spellCaster;
|
||||
// 23 GAMEOBJECT_TYPE_MEETINGSTONE
|
||||
struct
|
||||
{
|
||||
uint32 minLevel; // 0 minLevel, int, Min value: 0, Max value: 65535, Default value: 1
|
||||
uint32 maxLevel; // 1 maxLevel, int, Min value: 1, Max value: 65535, Default value: 60
|
||||
uint32 areaID; // 2 areaID, References: AreaTable, NoValue = 0
|
||||
} meetingStone;
|
||||
// 24 GAMEOBJECT_TYPE_FLAGSTAND
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 pickupSpell; // 1 pickupSpell, References: Spell, NoValue = 0
|
||||
uint32 radius; // 2 radius, int, Min value: 0, Max value: 50, Default value: 0
|
||||
uint32 returnAura; // 3 returnAura, References: Spell, NoValue = 0
|
||||
uint32 returnSpell; // 4 returnSpell, References: Spell, NoValue = 0
|
||||
uint32 noDamageImmune; // 5 noDamageImmune, enum { false, true, }; Default: false
|
||||
uint32 openTextID; // 6 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 requireLOS; // 7 require LOS, enum { false, true, }; Default: true
|
||||
uint32 conditionID1; // 8 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 playerCast; // 9 playerCast, enum { false, true, }; Default: false
|
||||
uint32 GiganticAOI; // 10 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 InfiniteAOI; // 11 Infinite AOI, enum { false, true, }; Default: false
|
||||
uint32 cooldown; // 12 cooldown, int, Min value: 0, Max value: 2147483647, Default value: 3000
|
||||
} flagStand;
|
||||
// 25 GAMEOBJECT_TYPE_FISHINGHOLE
|
||||
struct
|
||||
{
|
||||
uint32 radius; // 0 radius, int, Min value: 0, Max value: 50, Default value: 0
|
||||
uint32 chestLoot; // 1 chestLoot, References: Treasure, NoValue = 0
|
||||
uint32 minRestock; // 2 minRestock, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 maxRestock; // 3 maxRestock, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 open; // 4 open, References: Lock_, NoValue = 0
|
||||
} fishingHole;
|
||||
// 26 GAMEOBJECT_TYPE_FLAGDROP
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 eventID; // 1 eventID, References: GameEvents, NoValue = 0
|
||||
uint32 pickupSpell; // 2 pickupSpell, References: Spell, NoValue = 0
|
||||
uint32 noDamageImmune; // 3 noDamageImmune, enum { false, true, }; Default: false
|
||||
uint32 openTextID; // 4 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 playerCast; // 5 playerCast, enum { false, true, }; Default: false
|
||||
uint32 ExpireDuration; // 6 Expire Duration, int, Min value: 0, Max value: 60000, Default value: 10000
|
||||
uint32 GiganticAOI; // 7 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 InfiniteAOI; // 8 Infinite AOI, enum { false, true, }; Default: false
|
||||
uint32 cooldown; // 9 cooldown, int, Min value: 0, Max value: 2147483647, Default value: 3000
|
||||
} flagDrop;
|
||||
// 27 GAMEOBJECT_TYPE_MINI_GAME
|
||||
struct
|
||||
{
|
||||
} miniGame;
|
||||
// 28 GAMEOBJECT_TYPE_DO_NOT_USE_2
|
||||
struct
|
||||
{
|
||||
} DONOTUSE2;
|
||||
// 29 GAMEOBJECT_TYPE_CONTROL_ZONE
|
||||
struct
|
||||
{
|
||||
uint32 radius; // 0 radius, int, Min value: 0, Max value: 100, Default value: 10
|
||||
uint32 spell; // 1 spell, References: Spell, NoValue = 0
|
||||
uint32 worldState1; // 2 worldState1, References: WorldState, NoValue = 0
|
||||
uint32 worldstate2; // 3 worldstate2, References: WorldState, NoValue = 0
|
||||
uint32 CaptureEventHorde; // 4 Capture Event (Horde), References: GameEvents, NoValue = 0
|
||||
uint32 CaptureEventAlliance; // 5 Capture Event (Alliance), References: GameEvents, NoValue = 0
|
||||
uint32 ContestedEventHorde; // 6 Contested Event (Horde), References: GameEvents, NoValue = 0
|
||||
uint32 ContestedEventAlliance; // 7 Contested Event (Alliance), References: GameEvents, NoValue = 0
|
||||
uint32 ProgressEventHorde; // 8 Progress Event (Horde), References: GameEvents, NoValue = 0
|
||||
uint32 ProgressEventAlliance; // 9 Progress Event (Alliance), References: GameEvents, NoValue = 0
|
||||
uint32 NeutralEventHorde; // 10 Neutral Event (Horde), References: GameEvents, NoValue = 0
|
||||
uint32 NeutralEventAlliance; // 11 Neutral Event (Alliance), References: GameEvents, NoValue = 0
|
||||
uint32 neutralPercent; // 12 neutralPercent, int, Min value: 0, Max value: 100, Default value: 0
|
||||
uint32 worldstate3; // 13 worldstate3, References: WorldState, NoValue = 0
|
||||
uint32 minSuperiority; // 14 minSuperiority, int, Min value: 1, Max value: 65535, Default value: 1
|
||||
uint32 maxSuperiority; // 15 maxSuperiority, int, Min value: 1, Max value: 65535, Default value: 1
|
||||
uint32 minTime; // 16 minTime, int, Min value: 1, Max value: 65535, Default value: 1
|
||||
uint32 maxTime; // 17 maxTime, int, Min value: 1, Max value: 65535, Default value: 1
|
||||
uint32 GiganticAOI; // 18 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 highlight; // 19 highlight, enum { false, true, }; Default: true
|
||||
uint32 startingValue; // 20 startingValue, int, Min value: 0, Max value: 100, Default value: 50
|
||||
uint32 unidirectional; // 21 unidirectional, enum { false, true, }; Default: false
|
||||
uint32 killbonustime; // 22 kill bonus time %, int, Min value: 0, Max value: 100, Default value: 0
|
||||
uint32 speedWorldState1; // 23 speedWorldState1, References: WorldState, NoValue = 0
|
||||
uint32 speedWorldState2; // 24 speedWorldState2, References: WorldState, NoValue = 0
|
||||
uint32 UncontestedTime; // 25 Uncontested Time, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 FrequentHeartbeat; // 26 Frequent Heartbeat, enum { false, true, }; Default: false
|
||||
} controlZone;
|
||||
// 30 GAMEOBJECT_TYPE_AURA_GENERATOR
|
||||
struct
|
||||
{
|
||||
uint32 startOpen; // 0 startOpen, enum { false, true, }; Default: true
|
||||
uint32 radius; // 1 radius, int, Min value: 0, Max value: 100, Default value: 10
|
||||
uint32 auraID1; // 2 auraID1, References: Spell, NoValue = 0
|
||||
uint32 conditionID1; // 3 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 auraID2; // 4 auraID2, References: Spell, NoValue = 0
|
||||
uint32 conditionID2; // 5 conditionID2, References: PlayerCondition, NoValue = 0
|
||||
uint32 serverOnly; // 6 serverOnly, enum { false, true, }; Default: false
|
||||
} auraGenerator;
|
||||
// 31 GAMEOBJECT_TYPE_DUNGEON_DIFFICULTY
|
||||
struct
|
||||
{
|
||||
uint32 InstanceType; // 0 Instance Type, enum { Not Instanced, Party Dungeon, Raid Dungeon, PVP Battlefield, Arena Battlefield, Scenario, }; Default: Party Dungeon
|
||||
uint32 DifficultyNormal; // 1 Difficulty Normal, References: animationdata, NoValue = 0
|
||||
uint32 DifficultyHeroic; // 2 Difficulty Heroic, References: animationdata, NoValue = 0
|
||||
uint32 DifficultyEpic; // 3 Difficulty Epic, References: animationdata, NoValue = 0
|
||||
uint32 DifficultyLegendary; // 4 Difficulty Legendary, References: animationdata, NoValue = 0
|
||||
uint32 HeroicAttachment; // 5 Heroic Attachment, References: gameobjectdisplayinfo, NoValue = 0
|
||||
uint32 ChallengeAttachment; // 6 Challenge Attachment, References: gameobjectdisplayinfo, NoValue = 0
|
||||
uint32 DifficultyAnimations; // 7 Difficulty Animations, References: GameObjectDiffAnim, NoValue = 0
|
||||
uint32 LargeAOI; // 8 Large AOI, enum { false, true, }; Default: false
|
||||
uint32 GiganticAOI; // 9 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 Legacy; // 10 Legacy, enum { false, true, }; Default: false
|
||||
} dungeonDifficulty;
|
||||
// 32 GAMEOBJECT_TYPE_BARBER_CHAIR
|
||||
struct
|
||||
{
|
||||
uint32 chairheight; // 0 chairheight, int, Min value: 0, Max value: 2, Default value: 1
|
||||
int32 HeightOffset; // 1 Height Offset (inches), int, Min value: -100, Max value: 100, Default value: 0
|
||||
uint32 SitAnimKit; // 2 Sit Anim Kit, References: AnimKit, NoValue = 0
|
||||
} barberChair;
|
||||
// 33 GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING
|
||||
struct
|
||||
{
|
||||
int32 Unused; // 0 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
uint32 CreditProxyCreature; // 1 Credit Proxy Creature, References: Creature, NoValue = 0
|
||||
uint32 HealthRec; // 2 Health Rec, References: DestructibleHitpoint, NoValue = 0
|
||||
uint32 IntactEvent; // 3 Intact Event, References: GameEvents, NoValue = 0
|
||||
uint32 PVPEnabling; // 4 PVP Enabling, enum { false, true, }; Default: false
|
||||
uint32 InteriorVisible; // 5 Interior Visible, enum { false, true, }; Default: false
|
||||
uint32 InteriorLight; // 6 Interior Light, enum { false, true, }; Default: false
|
||||
int32 Unused1; // 7 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
int32 Unused2; // 8 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
uint32 DamagedEvent; // 9 Damaged Event, References: GameEvents, NoValue = 0
|
||||
int32 Unused3; // 10 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
int32 Unused4; // 11 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
int32 Unused5; // 12 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
int32 Unused6; // 13 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
uint32 DestroyedEvent; // 14 Destroyed Event, References: GameEvents, NoValue = 0
|
||||
int32 Unused7; // 15 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
uint32 RebuildingTime; // 16 Rebuilding: Time (secs), int, Min value: 0, Max value: 65535, Default value: 0
|
||||
int32 Unused8; // 17 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
uint32 DestructibleModelRec; // 18 Destructible Model Rec, References: DestructibleModelData, NoValue = 0
|
||||
uint32 RebuildingEvent; // 19 Rebuilding: Event, References: GameEvents, NoValue = 0
|
||||
int32 Unused9; // 20 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
int32 Unused10; // 21 Unused, int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
uint32 DamageEvent; // 22 Damage Event, References: GameEvents, NoValue = 0
|
||||
} destructibleBuilding;
|
||||
// 34 GAMEOBJECT_TYPE_GUILD_BANK
|
||||
struct
|
||||
{
|
||||
uint32 conditionID1; // 0 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
} guildbank;
|
||||
// 35 GAMEOBJECT_TYPE_TRAPDOOR
|
||||
struct
|
||||
{
|
||||
uint32 AutoLink; // 0 Auto Link, enum { false, true, }; Default: false
|
||||
uint32 startOpen; // 1 startOpen, enum { false, true, }; Default: false
|
||||
uint32 autoClose; // 2 autoClose (ms), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 BlocksPathsDown; // 3 Blocks Paths Down, enum { false, true, }; Default: false
|
||||
uint32 PathBlockerBump; // 4 Path Blocker Bump (ft), int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
} trapdoor;
|
||||
// 36 GAMEOBJECT_TYPE_NEW_FLAG
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 pickupSpell; // 1 pickupSpell, References: Spell, NoValue = 0
|
||||
uint32 openTextID; // 2 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 requireLOS; // 3 require LOS, enum { false, true, }; Default: true
|
||||
uint32 conditionID1; // 4 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 GiganticAOI; // 5 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 InfiniteAOI; // 6 Infinite AOI, enum { false, true, }; Default: false
|
||||
uint32 ExpireDuration; // 7 Expire Duration, int, Min value: 0, Max value: 3600000, Default value: 10000
|
||||
uint32 RespawnTime; // 8 Respawn Time, int, Min value: 0, Max value: 3600000, Default value: 20000
|
||||
uint32 FlagDrop; // 9 Flag Drop, References: GameObjects, NoValue = 0
|
||||
int32 ExclusiveCategory; // 10 Exclusive Category (BGs Only), int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
uint32 worldState1; // 11 worldState1, References: WorldState, NoValue = 0
|
||||
uint32 ReturnonDefenderInteract; // 12 Return on Defender Interact, enum { false, true, }; Default: false
|
||||
} newflag;
|
||||
// 37 GAMEOBJECT_TYPE_NEW_FLAG_DROP
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
} newflagdrop;
|
||||
// 38 GAMEOBJECT_TYPE_GARRISON_BUILDING
|
||||
struct
|
||||
{
|
||||
int32 SpawnMap; // 0 Spawn Map, References: Map, NoValue = -1
|
||||
} garrisonBuilding;
|
||||
// 39 GAMEOBJECT_TYPE_GARRISON_PLOT
|
||||
struct
|
||||
{
|
||||
uint32 PlotInstance; // 0 Plot Instance, References: GarrPlotInstance, NoValue = 0
|
||||
int32 SpawnMap; // 1 Spawn Map, References: Map, NoValue = -1
|
||||
} garrisonPlot;
|
||||
// 40 GAMEOBJECT_TYPE_CLIENT_CREATURE
|
||||
struct
|
||||
{
|
||||
uint32 CreatureDisplayInfo; // 0 Creature Display Info, References: CreatureDisplayInfo, NoValue = 0
|
||||
uint32 AnimKit; // 1 Anim Kit, References: AnimKit, NoValue = 0
|
||||
uint32 creatureID; // 2 creatureID, References: Creature, NoValue = 0
|
||||
} clientCreature;
|
||||
// 41 GAMEOBJECT_TYPE_CLIENT_ITEM
|
||||
struct
|
||||
{
|
||||
uint32 Item; // 0 Item, References: Item, NoValue = 0
|
||||
} clientItem;
|
||||
// 42 GAMEOBJECT_TYPE_CAPTURE_POINT
|
||||
struct
|
||||
{
|
||||
uint32 CaptureTime; // 0 Capture Time (ms), int, Min value: 0, Max value: 2147483647, Default value: 60000
|
||||
uint32 GiganticAOI; // 1 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 highlight; // 2 highlight, enum { false, true, }; Default: true
|
||||
uint32 open; // 3 open, References: Lock_, NoValue = 0
|
||||
uint32 AssaultBroadcastHorde; // 4 Assault Broadcast (Horde), References: BroadcastText, NoValue = 0
|
||||
uint32 CaptureBroadcastHorde; // 5 Capture Broadcast (Horde), References: BroadcastText, NoValue = 0
|
||||
uint32 DefendedBroadcastHorde; // 6 Defended Broadcast (Horde), References: BroadcastText, NoValue = 0
|
||||
uint32 AssaultBroadcastAlliance; // 7 Assault Broadcast (Alliance), References: BroadcastText, NoValue = 0
|
||||
uint32 CaptureBroadcastAlliance; // 8 Capture Broadcast (Alliance), References: BroadcastText, NoValue = 0
|
||||
uint32 DefendedBroadcastAlliance; // 9 Defended Broadcast (Alliance), References: BroadcastText, NoValue = 0
|
||||
uint32 worldState1; // 10 worldState1, References: WorldState, NoValue = 0
|
||||
uint32 ContestedEventHorde; // 11 Contested Event (Horde), References: GameEvents, NoValue = 0
|
||||
uint32 CaptureEventHorde; // 12 Capture Event (Horde), References: GameEvents, NoValue = 0
|
||||
uint32 DefendedEventHorde; // 13 Defended Event (Horde), References: GameEvents, NoValue = 0
|
||||
uint32 ContestedEventAlliance; // 14 Contested Event (Alliance), References: GameEvents, NoValue = 0
|
||||
uint32 CaptureEventAlliance; // 15 Capture Event (Alliance), References: GameEvents, NoValue = 0
|
||||
uint32 DefendedEventAlliance; // 16 Defended Event (Alliance), References: GameEvents, NoValue = 0
|
||||
uint32 SpellVisual1; // 17 Spell Visual 1, References: SpellVisual, NoValue = 0
|
||||
uint32 SpellVisual2; // 18 Spell Visual 2, References: SpellVisual, NoValue = 0
|
||||
uint32 SpellVisual3; // 19 Spell Visual 3, References: SpellVisual, NoValue = 0
|
||||
uint32 SpellVisual4; // 20 Spell Visual 4, References: SpellVisual, NoValue = 0
|
||||
uint32 SpellVisual5; // 21 Spell Visual 5, References: SpellVisual, NoValue = 0
|
||||
} capturePoint;
|
||||
// 43 GAMEOBJECT_TYPE_PHASEABLE_MO
|
||||
struct
|
||||
{
|
||||
int32 SpawnMap; // 0 Spawn Map, References: Map, NoValue = -1
|
||||
uint32 AreaNameSet; // 1 Area Name Set (Index), int, Min value: -2147483648, Max value: 2147483647, Default value: 0
|
||||
uint32 DoodadSetA; // 2 Doodad Set A, int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
uint32 DoodadSetB; // 3 Doodad Set B, int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
} phaseableMO;
|
||||
// 44 GAMEOBJECT_TYPE_GARRISON_MONUMENT
|
||||
struct
|
||||
{
|
||||
uint32 TrophyTypeID; // 0 Trophy Type ID, References: TrophyType, NoValue = 0
|
||||
uint32 TrophyInstanceID; // 1 Trophy Instance ID, References: TrophyInstance, NoValue = 0
|
||||
} garrisonMonument;
|
||||
// 45 GAMEOBJECT_TYPE_GARRISON_SHIPMENT
|
||||
struct
|
||||
{
|
||||
uint32 ShipmentContainer; // 0 Shipment Container, References: CharShipmentContainer, NoValue = 0
|
||||
uint32 GiganticAOI; // 1 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 LargeAOI; // 2 Large AOI, enum { false, true, }; Default: false
|
||||
} garrisonShipment;
|
||||
// 46 GAMEOBJECT_TYPE_GARRISON_MONUMENT_PLAQUE
|
||||
struct
|
||||
{
|
||||
uint32 TrophyInstanceID; // 0 Trophy Instance ID, References: TrophyInstance, NoValue = 0
|
||||
} garrisonMonumentPlaque;
|
||||
// 47 GAMEOBJECT_TYPE_ARTIFACT_FORGE
|
||||
struct
|
||||
{
|
||||
uint32 conditionID1; // 0 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 LargeAOI; // 1 Large AOI, enum { false, true, }; Default: false
|
||||
uint32 IgnoreBoundingBox; // 2 Ignore Bounding Box, enum { false, true, }; Default: false
|
||||
uint32 CameraMode; // 3 Camera Mode, References: CameraMode, NoValue = 0
|
||||
uint32 FadeRegionRadius; // 4 Fade Region Radius, int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
} artifactForge;
|
||||
// 48 GAMEOBJECT_TYPE_UI_LINK
|
||||
struct
|
||||
{
|
||||
uint32 UILinkType; // 0 UI Link Type, enum { Adventure Journal, Obliterum Forge, }; Default: Adventure Journal
|
||||
uint32 allowMounted; // 1 allowMounted, enum { false, true, }; Default: false
|
||||
uint32 GiganticAOI; // 2 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 spellFocusType; // 3 spellFocusType, References: SpellFocusObject, NoValue = 0
|
||||
uint32 radius; // 4 radius, int, Min value: 0, Max value: 50, Default value: 10
|
||||
} UILink;
|
||||
// 49 GAMEOBJECT_TYPE_KEYSTONE_RECEPTACLE
|
||||
struct
|
||||
{
|
||||
} KeystoneReceptacle;
|
||||
// 50 GAMEOBJECT_TYPE_GATHERING_NODE
|
||||
struct
|
||||
{
|
||||
uint32 open; // 0 open, References: Lock_, NoValue = 0
|
||||
uint32 chestLoot; // 1 chestLoot, References: Treasure, NoValue = 0
|
||||
uint32 level; // 2 level, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 notInCombat; // 3 notInCombat, enum { false, true, }; Default: false
|
||||
uint32 trivialSkillLow; // 4 trivialSkillLow, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 trivialSkillHigh; // 5 trivialSkillHigh, int, Min value: 0, Max value: 65535, Default value: 0
|
||||
uint32 ObjectDespawnDelay; // 6 Object Despawn Delay, int, Min value: 0, Max value: 600, Default value: 15
|
||||
uint32 triggeredEvent; // 7 triggeredEvent, References: GameEvents, NoValue = 0
|
||||
uint32 requireLOS; // 8 require LOS, enum { false, true, }; Default: false
|
||||
uint32 openTextID; // 9 openTextID, References: BroadcastText, NoValue = 0
|
||||
uint32 floatingTooltip; // 10 floatingTooltip, enum { false, true, }; Default: false
|
||||
uint32 conditionID1; // 11 conditionID1, References: PlayerCondition, NoValue = 0
|
||||
uint32 xpLevel; // 12 xpLevel, int, Min value: -1, Max value: 123, Default value: 0
|
||||
uint32 xpDifficulty; // 13 xpDifficulty, enum { No Exp, Trivial, Very Small, Small, Substandard, Standard, High, Epic, Dungeon, 5, }; Default: No Exp
|
||||
uint32 spell; // 14 spell, References: Spell, NoValue = 0
|
||||
uint32 GiganticAOI; // 15 Gigantic AOI, enum { false, true, }; Default: false
|
||||
uint32 LargeAOI; // 16 Large AOI, enum { false, true, }; Default: false
|
||||
uint32 SpawnVignette; // 17 Spawn Vignette, References: vignette, NoValue = 0
|
||||
uint32 MaxNumberofLoots; // 18 Max Number of Loots, int, Min value: 1, Max value: 40, Default value: 10
|
||||
uint32 logloot; // 19 log loot, enum { false, true, }; Default: false
|
||||
uint32 linkedTrap; // 20 linkedTrap, References: GameObjects, NoValue = 0
|
||||
} gatheringNode;
|
||||
// 51 GAMEOBJECT_TYPE_CHALLENGE_MODE_REWARD
|
||||
struct
|
||||
{
|
||||
uint32 chestLoot; // 0 chestLoot, References: Treasure, NoValue = 0
|
||||
uint32 WhenAvailable; // 1 When Available, References: GameObjectDisplayInfo, NoValue = 0
|
||||
} challengeModeReward;
|
||||
struct
|
||||
{
|
||||
uint32 data[MAX_GAMEOBJECT_DATA];
|
||||
} raw;
|
||||
};
|
||||
|
||||
std::string AIName;
|
||||
uint32 ScriptId;
|
||||
|
||||
// helpers
|
||||
bool IsDespawnAtAction() const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_CHEST: return chest.consumable != 0;
|
||||
case GAMEOBJECT_TYPE_GOOBER: return goober.consumable != 0;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool IsUsableMounted() const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_QUESTGIVER: return questgiver.allowMounted != 0;
|
||||
case GAMEOBJECT_TYPE_TEXT: return text.allowMounted != 0;
|
||||
case GAMEOBJECT_TYPE_GOOBER: return goober.allowMounted != 0;
|
||||
case GAMEOBJECT_TYPE_SPELLCASTER: return spellCaster.allowMounted != 0;
|
||||
case GAMEOBJECT_TYPE_UI_LINK: return UILink.allowMounted != 0;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetLockId() const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_DOOR: return door.open;
|
||||
case GAMEOBJECT_TYPE_BUTTON: return button.open;
|
||||
case GAMEOBJECT_TYPE_QUESTGIVER: return questgiver.open;
|
||||
case GAMEOBJECT_TYPE_CHEST: return chest.open;
|
||||
case GAMEOBJECT_TYPE_TRAP: return trap.open;
|
||||
case GAMEOBJECT_TYPE_GOOBER: return goober.open;
|
||||
case GAMEOBJECT_TYPE_AREADAMAGE: return areaDamage.open;
|
||||
case GAMEOBJECT_TYPE_CAMERA: return camera.open;
|
||||
case GAMEOBJECT_TYPE_FLAGSTAND: return flagStand.open;
|
||||
case GAMEOBJECT_TYPE_FISHINGHOLE: return fishingHole.open;
|
||||
case GAMEOBJECT_TYPE_FLAGDROP: return flagDrop.open;
|
||||
case GAMEOBJECT_TYPE_NEW_FLAG: return newflag.open;
|
||||
case GAMEOBJECT_TYPE_NEW_FLAG_DROP: return newflagdrop.open;
|
||||
case GAMEOBJECT_TYPE_CAPTURE_POINT: return capturePoint.open;
|
||||
case GAMEOBJECT_TYPE_GATHERING_NODE: return gatheringNode.open;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool GetDespawnPossibility() const // despawn at targeting of cast?
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_DOOR: return door.noDamageImmune != 0;
|
||||
case GAMEOBJECT_TYPE_BUTTON: return button.noDamageImmune != 0;
|
||||
case GAMEOBJECT_TYPE_QUESTGIVER: return questgiver.noDamageImmune != 0;
|
||||
case GAMEOBJECT_TYPE_GOOBER: return goober.noDamageImmune != 0;
|
||||
case GAMEOBJECT_TYPE_FLAGSTAND: return flagStand.noDamageImmune != 0;
|
||||
case GAMEOBJECT_TYPE_FLAGDROP: return flagDrop.noDamageImmune != 0;
|
||||
default: return true;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetCharges() const // despawn at uses amount
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
//case GAMEOBJECT_TYPE_TRAP: return trap.charges;
|
||||
case GAMEOBJECT_TYPE_GUARDPOST: return guardPost.charges;
|
||||
case GAMEOBJECT_TYPE_SPELLCASTER: return spellCaster.charges;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetLinkedGameObjectEntry() const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_BUTTON: return button.linkedTrap;
|
||||
case GAMEOBJECT_TYPE_CHEST: return chest.linkedTrap;
|
||||
case GAMEOBJECT_TYPE_SPELL_FOCUS: return spellFocus.linkedTrap;
|
||||
case GAMEOBJECT_TYPE_GOOBER: return goober.linkedTrap;
|
||||
case GAMEOBJECT_TYPE_GATHERING_NODE: return gatheringNode.linkedTrap;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetAutoCloseTime() const
|
||||
{
|
||||
uint32 autoCloseTime = 0;
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_DOOR: autoCloseTime = door.autoClose; break;
|
||||
case GAMEOBJECT_TYPE_BUTTON: autoCloseTime = button.autoClose; break;
|
||||
case GAMEOBJECT_TYPE_TRAP: autoCloseTime = trap.autoClose; break;
|
||||
case GAMEOBJECT_TYPE_GOOBER: autoCloseTime = goober.autoClose; break;
|
||||
case GAMEOBJECT_TYPE_TRANSPORT: autoCloseTime = transport.autoClose; break;
|
||||
case GAMEOBJECT_TYPE_AREADAMAGE: autoCloseTime = areaDamage.autoClose; break;
|
||||
case GAMEOBJECT_TYPE_TRAPDOOR: autoCloseTime = trapdoor.autoClose; break;
|
||||
default: break;
|
||||
}
|
||||
return autoCloseTime / IN_MILLISECONDS; // prior to 3.0.3, conversion was / 0x10000;
|
||||
}
|
||||
|
||||
uint32 GetLootId() const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_CHEST: return chest.chestLoot;
|
||||
case GAMEOBJECT_TYPE_FISHINGHOLE: return fishingHole.chestLoot;
|
||||
case GAMEOBJECT_TYPE_GATHERING_NODE: return gatheringNode.chestLoot;
|
||||
case GAMEOBJECT_TYPE_CHALLENGE_MODE_REWARD: return challengeModeReward.chestLoot;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetGossipMenuId() const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_QUESTGIVER: return questgiver.gossipID;
|
||||
case GAMEOBJECT_TYPE_GOOBER: return goober.gossipID;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetEventScriptId() const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_GOOBER: return goober.eventID;
|
||||
case GAMEOBJECT_TYPE_CHEST: return chest.triggeredEvent;
|
||||
case GAMEOBJECT_TYPE_CAMERA: return camera.eventID;
|
||||
case GAMEOBJECT_TYPE_GATHERING_NODE: return gatheringNode.triggeredEvent;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetCooldown() const // Cooldown preventing goober and traps to cast spell
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_TRAP: return trap.cooldown;
|
||||
case GAMEOBJECT_TYPE_GOOBER: return goober.cooldown;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// From `gameobject_template_addon`
|
||||
struct GameObjectTemplateAddon
|
||||
{
|
||||
uint32 entry;
|
||||
uint32 faction;
|
||||
uint32 flags;
|
||||
uint32 mingold;
|
||||
uint32 maxgold;
|
||||
};
|
||||
|
||||
|
||||
struct GameObjectLocale
|
||||
{
|
||||
std::vector<std::string> Name;
|
||||
std::vector<std::string> CastBarCaption;
|
||||
std::vector<std::string> Unk1;
|
||||
};
|
||||
|
||||
struct TC_GAME_API QuaternionData
|
||||
{
|
||||
float x, y, z, w;
|
||||
|
||||
QuaternionData() : x(0.0f), y(0.0f), z(0.0f), w(1.0f) {}
|
||||
QuaternionData(float X, float Y, float Z, float W) : x(X), y(Y), z(Z), w(W) {}
|
||||
|
||||
bool isUnit() const;
|
||||
static QuaternionData fromEulerAnglesZYX(float Z, float Y, float X);
|
||||
};
|
||||
|
||||
// `gameobject_addon` table
|
||||
struct GameObjectAddon
|
||||
{
|
||||
QuaternionData ParentRotation;
|
||||
InvisibilityType invisibilityType;
|
||||
uint32 InvisibilityValue;
|
||||
};
|
||||
|
||||
// from `gameobject`
|
||||
struct GameObjectData
|
||||
{
|
||||
explicit GameObjectData() : id(0), mapid(0), phaseMask(0), posX(0.0f), posY(0.0f), posZ(0.0f), orientation(0.0f), spawntimesecs(0),
|
||||
animprogress(0), go_state(GO_STATE_ACTIVE), spawnMask(0), artKit(0), phaseid(0), phaseGroup(0), dbData(true) { }
|
||||
uint32 id; // entry in gamobject_template
|
||||
uint16 mapid;
|
||||
uint32 phaseMask;
|
||||
float posX;
|
||||
float posY;
|
||||
float posZ;
|
||||
float orientation;
|
||||
QuaternionData rotation;
|
||||
int32 spawntimesecs;
|
||||
uint32 animprogress;
|
||||
GOState go_state;
|
||||
uint32 spawnMask;
|
||||
uint8 artKit;
|
||||
uint32 phaseid;
|
||||
uint32 phaseGroup;
|
||||
uint32 ScriptId;
|
||||
bool dbData;
|
||||
};
|
||||
|
||||
#endif // GameObjectData_h__
|
||||
@@ -23,7 +23,6 @@
|
||||
#define MAX_BAG_SIZE 36 // 2.0.12
|
||||
|
||||
#include "Item.h"
|
||||
#include "ItemTemplate.h"
|
||||
|
||||
class TC_GAME_API Bag : public Item
|
||||
{
|
||||
|
||||
@@ -18,24 +18,26 @@
|
||||
|
||||
#include "Item.h"
|
||||
#include "ArtifactPackets.h"
|
||||
#include "Bag.h"
|
||||
#include "CollectionMgr.h"
|
||||
#include "Common.h"
|
||||
#include "ConditionMgr.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GameTables.h"
|
||||
#include "ItemEnchantmentMgr.h"
|
||||
#include "ItemPackets.h"
|
||||
#include "Log.h"
|
||||
#include "LootMgr.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "TradeData.h"
|
||||
#include "UpdateData.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
void AddItemsSetItem(Player* player, Item* item)
|
||||
@@ -958,7 +960,7 @@ void Item::SetState(ItemUpdateState state, Player* forplayer)
|
||||
// pretend the item never existed
|
||||
if (forplayer)
|
||||
{
|
||||
RemoveFromUpdateQueueOf(forplayer);
|
||||
RemoveItemFromUpdateQueueOf(this, forplayer);
|
||||
forplayer->DeleteRefundReference(GetGUID());
|
||||
}
|
||||
delete this;
|
||||
@@ -971,7 +973,7 @@ void Item::SetState(ItemUpdateState state, Player* forplayer)
|
||||
uState = state;
|
||||
|
||||
if (forplayer)
|
||||
AddToUpdateQueueOf(forplayer);
|
||||
AddItemToUpdateQueueOf(this, forplayer);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -982,46 +984,46 @@ void Item::SetState(ItemUpdateState state, Player* forplayer)
|
||||
}
|
||||
}
|
||||
|
||||
void Item::AddToUpdateQueueOf(Player* player)
|
||||
void AddItemToUpdateQueueOf(Item* item, Player* player)
|
||||
{
|
||||
if (IsInUpdateQueue())
|
||||
if (item->IsInUpdateQueue())
|
||||
return;
|
||||
|
||||
ASSERT(player != NULL);
|
||||
|
||||
if (player->GetGUID() != GetOwnerGUID())
|
||||
if (player->GetGUID() != item->GetOwnerGUID())
|
||||
{
|
||||
TC_LOG_DEBUG("entities.player.items", "Item::AddToUpdateQueueOf - Owner's guid (%s) and player's guid (%s) don't match!",
|
||||
GetOwnerGUID().ToString().c_str(), player->GetGUID().ToString().c_str());
|
||||
item->GetOwnerGUID().ToString().c_str(), player->GetGUID().ToString().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if (player->m_itemUpdateQueueBlocked)
|
||||
return;
|
||||
|
||||
player->m_itemUpdateQueue.push_back(this);
|
||||
uQueuePos = player->m_itemUpdateQueue.size()-1;
|
||||
player->m_itemUpdateQueue.push_back(item);
|
||||
item->uQueuePos = player->m_itemUpdateQueue.size() - 1;
|
||||
}
|
||||
|
||||
void Item::RemoveFromUpdateQueueOf(Player* player)
|
||||
void RemoveItemFromUpdateQueueOf(Item* item, Player* player)
|
||||
{
|
||||
if (!IsInUpdateQueue())
|
||||
if (!item->IsInUpdateQueue())
|
||||
return;
|
||||
|
||||
ASSERT(player != NULL);
|
||||
|
||||
if (player->GetGUID() != GetOwnerGUID())
|
||||
if (player->GetGUID() != item->GetOwnerGUID())
|
||||
{
|
||||
TC_LOG_DEBUG("entities.player.items", "Item::RemoveFromUpdateQueueOf - Owner's guid (%s) and player's guid (%s) don't match!",
|
||||
GetOwnerGUID().ToString().c_str(), player->GetGUID().ToString().c_str());
|
||||
item->GetOwnerGUID().ToString().c_str(), player->GetGUID().ToString().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if (player->m_itemUpdateQueueBlocked)
|
||||
return;
|
||||
|
||||
player->m_itemUpdateQueue[uQueuePos] = NULL;
|
||||
uQueuePos = -1;
|
||||
player->m_itemUpdateQueue[item->uQueuePos] = nullptr;
|
||||
item->uQueuePos = -1;
|
||||
}
|
||||
|
||||
uint8 Item::GetBagSlot() const
|
||||
@@ -1042,7 +1044,7 @@ bool Item::CanBeTraded(bool mail, bool trade) const
|
||||
if ((!mail || !IsBoundAccountWide()) && (IsSoulBound() && (!HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_BOP_TRADEABLE) || !trade)))
|
||||
return false;
|
||||
|
||||
if (IsBag() && (Player::IsBagPos(GetPos()) || !((Bag const*)this)->IsEmpty()))
|
||||
if (IsBag() && (Player::IsBagPos(GetPos()) || !ToBag()->IsEmpty()))
|
||||
return false;
|
||||
|
||||
if (Player* owner = GetOwner())
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
#ifndef TRINITYCORE_ITEM_H
|
||||
#define TRINITYCORE_ITEM_H
|
||||
|
||||
#include "Common.h"
|
||||
#include "Object.h"
|
||||
#include "Loot.h"
|
||||
#include "Common.h"
|
||||
#include "DatabaseEnvFwd.h"
|
||||
#include "ItemDefines.h"
|
||||
#include "ItemEnchantmentMgr.h"
|
||||
#include "ItemTemplate.h"
|
||||
#include "DatabaseEnvFwd.h"
|
||||
#include <unordered_set>
|
||||
#include "Loot.h"
|
||||
|
||||
class SpellInfo;
|
||||
class Bag;
|
||||
@@ -45,158 +45,6 @@ struct ItemSetEffect
|
||||
std::unordered_set<ItemSetSpellEntry const*> SetBonuses;
|
||||
};
|
||||
|
||||
enum InventoryResult : uint8
|
||||
{
|
||||
EQUIP_ERR_OK = 0,
|
||||
EQUIP_ERR_CANT_EQUIP_LEVEL_I = 1, // You must reach level %d to use that item.
|
||||
EQUIP_ERR_CANT_EQUIP_SKILL = 2, // You aren't skilled enough to use that item.
|
||||
EQUIP_ERR_WRONG_SLOT = 3, // That item does not go in that slot.
|
||||
EQUIP_ERR_BAG_FULL = 4, // That bag is full.
|
||||
EQUIP_ERR_BAG_IN_BAG = 5, // Can't put non-empty bags in other bags.
|
||||
EQUIP_ERR_TRADE_EQUIPPED_BAG = 6, // You can't trade equipped bags.
|
||||
EQUIP_ERR_AMMO_ONLY = 7, // Only ammo can go there.
|
||||
EQUIP_ERR_PROFICIENCY_NEEDED = 8, // You do not have the required proficiency for that item.
|
||||
EQUIP_ERR_NO_SLOT_AVAILABLE = 9, // No equipment slot is available for that item.
|
||||
EQUIP_ERR_CANT_EQUIP_EVER = 10, // You can never use that item.
|
||||
EQUIP_ERR_CANT_EQUIP_EVER_2 = 11, // You can never use that item.
|
||||
EQUIP_ERR_NO_SLOT_AVAILABLE_2 = 12, // No equipment slot is available for that item.
|
||||
EQUIP_ERR_2HANDED_EQUIPPED = 13, // Cannot equip that with a two-handed weapon.
|
||||
EQUIP_ERR_2HSKILLNOTFOUND = 14, // You cannot dual-wield
|
||||
EQUIP_ERR_WRONG_BAG_TYPE = 15, // That item doesn't go in that container.
|
||||
EQUIP_ERR_WRONG_BAG_TYPE_2 = 16, // That item doesn't go in that container.
|
||||
EQUIP_ERR_ITEM_MAX_COUNT = 17, // You can't carry any more of those items.
|
||||
EQUIP_ERR_NO_SLOT_AVAILABLE_3 = 18, // No equipment slot is available for that item.
|
||||
EQUIP_ERR_CANT_STACK = 19, // This item cannot stack.
|
||||
EQUIP_ERR_NOT_EQUIPPABLE = 20, // This item cannot be equipped.
|
||||
EQUIP_ERR_CANT_SWAP = 21, // These items can't be swapped.
|
||||
EQUIP_ERR_SLOT_EMPTY = 22, // That slot is empty.
|
||||
EQUIP_ERR_ITEM_NOT_FOUND = 23, // The item was not found.
|
||||
EQUIP_ERR_DROP_BOUND_ITEM = 24, // You can't drop a soulbound item.
|
||||
EQUIP_ERR_OUT_OF_RANGE = 25, // Out of range.
|
||||
EQUIP_ERR_TOO_FEW_TO_SPLIT = 26, // Tried to split more than number in stack.
|
||||
EQUIP_ERR_SPLIT_FAILED = 27, // Couldn't split those items.
|
||||
EQUIP_ERR_SPELL_FAILED_REAGENTS_GENERIC = 28, // Missing reagent
|
||||
EQUIP_ERR_NOT_ENOUGH_MONEY = 29, // You don't have enough money.
|
||||
EQUIP_ERR_NOT_A_BAG = 30, // Not a bag.
|
||||
EQUIP_ERR_DESTROY_NONEMPTY_BAG = 31, // You can only do that with empty bags.
|
||||
EQUIP_ERR_NOT_OWNER = 32, // You don't own that item.
|
||||
EQUIP_ERR_ONLY_ONE_QUIVER = 33, // You can only equip one quiver.
|
||||
EQUIP_ERR_NO_BANK_SLOT = 34, // You must purchase that bag slot first
|
||||
EQUIP_ERR_NO_BANK_HERE = 35, // You are too far away from a bank.
|
||||
EQUIP_ERR_ITEM_LOCKED = 36, // Item is locked.
|
||||
EQUIP_ERR_GENERIC_STUNNED = 37, // You are stunned
|
||||
EQUIP_ERR_PLAYER_DEAD = 38, // You can't do that when you're dead.
|
||||
EQUIP_ERR_CLIENT_LOCKED_OUT = 39, // You can't do that right now.
|
||||
EQUIP_ERR_INTERNAL_BAG_ERROR = 40, // Internal Bag Error
|
||||
EQUIP_ERR_ONLY_ONE_BOLT = 41, // You can only equip one quiver.
|
||||
EQUIP_ERR_ONLY_ONE_AMMO = 42, // You can only equip one ammo pouch.
|
||||
EQUIP_ERR_CANT_WRAP_STACKABLE = 43, // Stackable items can't be wrapped.
|
||||
EQUIP_ERR_CANT_WRAP_EQUIPPED = 44, // Equipped items can't be wrapped.
|
||||
EQUIP_ERR_CANT_WRAP_WRAPPED = 45, // Wrapped items can't be wrapped.
|
||||
EQUIP_ERR_CANT_WRAP_BOUND = 46, // Bound items can't be wrapped.
|
||||
EQUIP_ERR_CANT_WRAP_UNIQUE = 47, // Unique items can't be wrapped.
|
||||
EQUIP_ERR_CANT_WRAP_BAGS = 48, // Bags can't be wrapped.
|
||||
EQUIP_ERR_LOOT_GONE = 49, // Already looted
|
||||
EQUIP_ERR_INV_FULL = 50, // Inventory is full.
|
||||
EQUIP_ERR_BANK_FULL = 51, // Your bank is full
|
||||
EQUIP_ERR_VENDOR_SOLD_OUT = 52, // That item is currently sold out.
|
||||
EQUIP_ERR_BAG_FULL_2 = 53, // That bag is full.
|
||||
EQUIP_ERR_ITEM_NOT_FOUND_2 = 54, // The item was not found.
|
||||
EQUIP_ERR_CANT_STACK_2 = 55, // This item cannot stack.
|
||||
EQUIP_ERR_BAG_FULL_3 = 56, // That bag is full.
|
||||
EQUIP_ERR_VENDOR_SOLD_OUT_2 = 57, // That item is currently sold out.
|
||||
EQUIP_ERR_OBJECT_IS_BUSY = 58, // That object is busy.
|
||||
EQUIP_ERR_CANT_BE_DISENCHANTED = 59,
|
||||
EQUIP_ERR_NOT_IN_COMBAT = 60, // You can't do that while in combat
|
||||
EQUIP_ERR_NOT_WHILE_DISARMED = 61, // You can't do that while disarmed
|
||||
EQUIP_ERR_BAG_FULL_4 = 62, // That bag is full.
|
||||
EQUIP_ERR_CANT_EQUIP_RANK = 63, // You don't have the required rank for that item
|
||||
EQUIP_ERR_CANT_EQUIP_REPUTATION = 64, // You don't have the required reputation for that item
|
||||
EQUIP_ERR_TOO_MANY_SPECIAL_BAGS = 65, // You cannot equip another bag of that type
|
||||
EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW = 66, // You can't loot that item now.
|
||||
EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE = 67, // You cannot equip more than one of those.
|
||||
EQUIP_ERR_VENDOR_MISSING_TURNINS = 68, // You do not have the required items for that purchase
|
||||
EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS = 69, // You don't have enough honor points
|
||||
EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS = 70, // You don't have enough arena points
|
||||
EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED = 71, // You have the maximum number of those gems in your inventory or socketed into items.
|
||||
EQUIP_ERR_MAIL_BOUND_ITEM = 72, // You can't mail soulbound items.
|
||||
EQUIP_ERR_INTERNAL_BAG_ERROR_2 = 73, // Internal Bag Error
|
||||
EQUIP_ERR_BAG_FULL_5 = 74, // That bag is full.
|
||||
EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED = 75, // You have the maximum number of those gems socketed into equipped items.
|
||||
EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED = 76, // You cannot socket more than one of those gems into a single item.
|
||||
EQUIP_ERR_TOO_MUCH_GOLD = 77, // At gold limit
|
||||
EQUIP_ERR_NOT_DURING_ARENA_MATCH = 78, // You can't do that while in an arena match
|
||||
EQUIP_ERR_TRADE_BOUND_ITEM = 79, // You can't trade a soulbound item.
|
||||
EQUIP_ERR_CANT_EQUIP_RATING = 80, // You don't have the personal, team, or battleground rating required to buy that item
|
||||
EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM = 81,
|
||||
EQUIP_ERR_NOT_SAME_ACCOUNT = 82, // Account-bound items can only be given to your own characters.
|
||||
EQUIP_ERR_NO_OUTPUT = 83,
|
||||
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS = 84, // You can only carry %d %s
|
||||
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED_IS = 85, // You can only equip %d |4item:items in the %s category
|
||||
EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED = 86, // Your level is too high to use that item
|
||||
EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW = 87, // You must reach level %d to purchase that item.
|
||||
EQUIP_ERR_CANT_EQUIP_NEED_TALENT = 88, // You do not have the required talent to equip that.
|
||||
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS = 89, // You can only equip %d |4item:items in the %s category
|
||||
EQUIP_ERR_SHAPESHIFT_FORM_CANNOT_EQUIP = 90, // Cannot equip item in this form
|
||||
EQUIP_ERR_ITEM_INVENTORY_FULL_SATCHEL = 91, // Your inventory is full. Your satchel has been delivered to your mailbox.
|
||||
EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_TOO_LOW = 92, // Your level is too low to use that item
|
||||
EQUIP_ERR_CANT_BUY_QUANTITY = 93, // You can't buy the specified quantity of that item.
|
||||
EQUIP_ERR_ITEM_IS_BATTLE_PAY_LOCKED = 94, // Your purchased item is still waiting to be unlocked
|
||||
EQUIP_ERR_REAGENT_BANK_FULL = 95, // Your reagent bank is full
|
||||
EQUIP_ERR_REAGENT_BANK_LOCKED = 96,
|
||||
EQUIP_ERR_WRONG_BAG_TYPE_3 = 97,
|
||||
EQUIP_ERR_CANT_USE_ITEM = 98, // You can't use that item.
|
||||
EQUIP_ERR_CANT_BE_OBLITERATED = 99, // You can't obliterate that item
|
||||
EQUIP_ERR_GUILD_BANK_CONJURED_ITEM = 100,// You cannot store conjured items in the guild bank
|
||||
};
|
||||
|
||||
enum BuyResult
|
||||
{
|
||||
BUY_ERR_CANT_FIND_ITEM = 0,
|
||||
BUY_ERR_ITEM_ALREADY_SOLD = 1,
|
||||
BUY_ERR_NOT_ENOUGHT_MONEY = 2,
|
||||
BUY_ERR_SELLER_DONT_LIKE_YOU = 4,
|
||||
BUY_ERR_DISTANCE_TOO_FAR = 5,
|
||||
BUY_ERR_ITEM_SOLD_OUT = 7,
|
||||
BUY_ERR_CANT_CARRY_MORE = 8,
|
||||
BUY_ERR_RANK_REQUIRE = 11,
|
||||
BUY_ERR_REPUTATION_REQUIRE = 12
|
||||
};
|
||||
|
||||
enum SellResult
|
||||
{
|
||||
SELL_ERR_CANT_FIND_ITEM = 1,
|
||||
SELL_ERR_CANT_SELL_ITEM = 2, // merchant doesn't like that item
|
||||
SELL_ERR_CANT_FIND_VENDOR = 3, // merchant doesn't like you
|
||||
SELL_ERR_YOU_DONT_OWN_THAT_ITEM = 4, // you don't own that item
|
||||
SELL_ERR_UNK = 5, // nothing appears...
|
||||
SELL_ERR_ONLY_EMPTY_BAG = 6 // can only do with empty bags
|
||||
};
|
||||
|
||||
// -1 from client enchantment slot number
|
||||
enum EnchantmentSlot : uint16
|
||||
{
|
||||
PERM_ENCHANTMENT_SLOT = 0,
|
||||
TEMP_ENCHANTMENT_SLOT = 1,
|
||||
SOCK_ENCHANTMENT_SLOT = 2,
|
||||
SOCK_ENCHANTMENT_SLOT_2 = 3,
|
||||
SOCK_ENCHANTMENT_SLOT_3 = 4,
|
||||
BONUS_ENCHANTMENT_SLOT = 5,
|
||||
PRISMATIC_ENCHANTMENT_SLOT = 6, // added at apply special permanent enchantment
|
||||
USE_ENCHANTMENT_SLOT = 7,
|
||||
|
||||
MAX_INSPECTED_ENCHANTMENT_SLOT = 8,
|
||||
|
||||
PROP_ENCHANTMENT_SLOT_0 = 8, // used with RandomSuffix
|
||||
PROP_ENCHANTMENT_SLOT_1 = 9, // used with RandomSuffix
|
||||
PROP_ENCHANTMENT_SLOT_2 = 10, // used with RandomSuffix and RandomProperty
|
||||
PROP_ENCHANTMENT_SLOT_3 = 11, // used with RandomProperty
|
||||
PROP_ENCHANTMENT_SLOT_4 = 12, // used with RandomProperty
|
||||
MAX_ENCHANTMENT_SLOT = 13
|
||||
};
|
||||
|
||||
#define MAX_VISIBLE_ITEM_OFFSET 2 // 2 fields per visible item (entry+enchantment)
|
||||
|
||||
#define MAX_GEM_SOCKETS MAX_ITEM_PROTO_SOCKETS// (BONUS_ENCHANTMENT_SLOT-SOCK_ENCHANTMENT_SLOT) and item proto size, equal value expected
|
||||
|
||||
enum EnchantmentOffset
|
||||
@@ -208,16 +56,6 @@ enum EnchantmentOffset
|
||||
|
||||
#define MAX_ENCHANTMENT_OFFSET 3
|
||||
|
||||
enum EnchantmentSlotMask
|
||||
{
|
||||
ENCHANTMENT_CAN_SOULBOUND = 0x01,
|
||||
ENCHANTMENT_UNK1 = 0x02,
|
||||
ENCHANTMENT_UNK2 = 0x04,
|
||||
ENCHANTMENT_UNK3 = 0x08,
|
||||
ENCHANTMENT_COLLECTABLE = 0x100,
|
||||
ENCHANTMENT_HIDE_IF_NOT_COLLECTED = 0x200,
|
||||
};
|
||||
|
||||
enum ItemUpdateState
|
||||
{
|
||||
ITEM_UNCHANGED = 0,
|
||||
@@ -226,36 +64,6 @@ enum ItemUpdateState
|
||||
ITEM_REMOVED = 3
|
||||
};
|
||||
|
||||
enum ItemModifier : uint16
|
||||
{
|
||||
ITEM_MODIFIER_TRANSMOG_APPEARANCE_ALL_SPECS = 0,
|
||||
ITEM_MODIFIER_TRANSMOG_APPEARANCE_SPEC_1 = 1,
|
||||
ITEM_MODIFIER_UPGRADE_ID = 2,
|
||||
ITEM_MODIFIER_BATTLE_PET_SPECIES_ID = 3,
|
||||
ITEM_MODIFIER_BATTLE_PET_BREED_DATA = 4, // (breedId) | (breedQuality << 24)
|
||||
ITEM_MODIFIER_BATTLE_PET_LEVEL = 5,
|
||||
ITEM_MODIFIER_BATTLE_PET_DISPLAY_ID = 6,
|
||||
ITEM_MODIFIER_ENCHANT_ILLUSION_ALL_SPECS = 7,
|
||||
ITEM_MODIFIER_ARTIFACT_APPEARANCE_ID = 8,
|
||||
ITEM_MODIFIER_SCALING_STAT_DISTRIBUTION_FIXED_LEVEL = 9,
|
||||
ITEM_MODIFIER_ENCHANT_ILLUSION_SPEC_1 = 10,
|
||||
ITEM_MODIFIER_TRANSMOG_APPEARANCE_SPEC_2 = 11,
|
||||
ITEM_MODIFIER_ENCHANT_ILLUSION_SPEC_2 = 12,
|
||||
ITEM_MODIFIER_TRANSMOG_APPEARANCE_SPEC_3 = 13,
|
||||
ITEM_MODIFIER_ENCHANT_ILLUSION_SPEC_3 = 14,
|
||||
ITEM_MODIFIER_TRANSMOG_APPEARANCE_SPEC_4 = 15,
|
||||
ITEM_MODIFIER_ENCHANT_ILLUSION_SPEC_4 = 16,
|
||||
ITEM_MODIFIER_CHALLENGE_MAP_CHALLENGE_MODE_ID = 17,
|
||||
ITEM_MODIFIER_CHALLENGE_KEYSTONE_LEVEL = 18,
|
||||
ITEM_MODIFIER_CHALLENGE_KEYSTONE_AFFIX_ID_1 = 19,
|
||||
ITEM_MODIFIER_CHALLENGE_KEYSTONE_AFFIX_ID_2 = 20,
|
||||
ITEM_MODIFIER_CHALLENGE_KEYSTONE_AFFIX_ID_3 = 21,
|
||||
ITEM_MODIFIER_CHALLENGE_KEYSTONE_IS_CHARGED = 22,
|
||||
ITEM_MODIFIER_ARTIFACT_KNOWLEDGE_LEVEL = 23,
|
||||
ITEM_MODIFIER_ARTIFACT_TIER = 24,
|
||||
|
||||
MAX_ITEM_MODIFIERS
|
||||
};
|
||||
|
||||
#define MAX_ITEM_SPELLS 5
|
||||
|
||||
@@ -318,6 +126,8 @@ struct ItemDynamicFieldGems
|
||||
|
||||
class TC_GAME_API Item : public Object
|
||||
{
|
||||
friend void AddItemToUpdateQueueOf(Item* item, Player* player);
|
||||
friend void RemoveItemFromUpdateQueueOf(Item* item, Player* player);
|
||||
public:
|
||||
static Item* CreateItem(uint32 itemEntry, uint32 count, Player const* player = NULL);
|
||||
Item* CloneItem(uint32 count, Player const* player = NULL) const;
|
||||
@@ -435,7 +245,6 @@ class TC_GAME_API Item : public Object
|
||||
// Update States
|
||||
ItemUpdateState GetState() const { return uState; }
|
||||
void SetState(ItemUpdateState state, Player* forplayer = NULL);
|
||||
void AddToUpdateQueueOf(Player* player);
|
||||
void RemoveFromUpdateQueueOf(Player* player);
|
||||
bool IsInUpdateQueue() const { return uQueuePos != -1; }
|
||||
uint16 GetQueuePos() const { return uQueuePos; }
|
||||
|
||||
@@ -0,0 +1,213 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2017 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 ItemDefines_h__
|
||||
#define ItemDefines_h__
|
||||
|
||||
#include "Define.h"
|
||||
|
||||
enum InventoryResult : uint8
|
||||
{
|
||||
EQUIP_ERR_OK = 0,
|
||||
EQUIP_ERR_CANT_EQUIP_LEVEL_I = 1, // You must reach level %d to use that item.
|
||||
EQUIP_ERR_CANT_EQUIP_SKILL = 2, // You aren't skilled enough to use that item.
|
||||
EQUIP_ERR_WRONG_SLOT = 3, // That item does not go in that slot.
|
||||
EQUIP_ERR_BAG_FULL = 4, // That bag is full.
|
||||
EQUIP_ERR_BAG_IN_BAG = 5, // Can't put non-empty bags in other bags.
|
||||
EQUIP_ERR_TRADE_EQUIPPED_BAG = 6, // You can't trade equipped bags.
|
||||
EQUIP_ERR_AMMO_ONLY = 7, // Only ammo can go there.
|
||||
EQUIP_ERR_PROFICIENCY_NEEDED = 8, // You do not have the required proficiency for that item.
|
||||
EQUIP_ERR_NO_SLOT_AVAILABLE = 9, // No equipment slot is available for that item.
|
||||
EQUIP_ERR_CANT_EQUIP_EVER = 10, // You can never use that item.
|
||||
EQUIP_ERR_CANT_EQUIP_EVER_2 = 11, // You can never use that item.
|
||||
EQUIP_ERR_NO_SLOT_AVAILABLE_2 = 12, // No equipment slot is available for that item.
|
||||
EQUIP_ERR_2HANDED_EQUIPPED = 13, // Cannot equip that with a two-handed weapon.
|
||||
EQUIP_ERR_2HSKILLNOTFOUND = 14, // You cannot dual-wield
|
||||
EQUIP_ERR_WRONG_BAG_TYPE = 15, // That item doesn't go in that container.
|
||||
EQUIP_ERR_WRONG_BAG_TYPE_2 = 16, // That item doesn't go in that container.
|
||||
EQUIP_ERR_ITEM_MAX_COUNT = 17, // You can't carry any more of those items.
|
||||
EQUIP_ERR_NO_SLOT_AVAILABLE_3 = 18, // No equipment slot is available for that item.
|
||||
EQUIP_ERR_CANT_STACK = 19, // This item cannot stack.
|
||||
EQUIP_ERR_NOT_EQUIPPABLE = 20, // This item cannot be equipped.
|
||||
EQUIP_ERR_CANT_SWAP = 21, // These items can't be swapped.
|
||||
EQUIP_ERR_SLOT_EMPTY = 22, // That slot is empty.
|
||||
EQUIP_ERR_ITEM_NOT_FOUND = 23, // The item was not found.
|
||||
EQUIP_ERR_DROP_BOUND_ITEM = 24, // You can't drop a soulbound item.
|
||||
EQUIP_ERR_OUT_OF_RANGE = 25, // Out of range.
|
||||
EQUIP_ERR_TOO_FEW_TO_SPLIT = 26, // Tried to split more than number in stack.
|
||||
EQUIP_ERR_SPLIT_FAILED = 27, // Couldn't split those items.
|
||||
EQUIP_ERR_SPELL_FAILED_REAGENTS_GENERIC = 28, // Missing reagent
|
||||
EQUIP_ERR_NOT_ENOUGH_MONEY = 29, // You don't have enough money.
|
||||
EQUIP_ERR_NOT_A_BAG = 30, // Not a bag.
|
||||
EQUIP_ERR_DESTROY_NONEMPTY_BAG = 31, // You can only do that with empty bags.
|
||||
EQUIP_ERR_NOT_OWNER = 32, // You don't own that item.
|
||||
EQUIP_ERR_ONLY_ONE_QUIVER = 33, // You can only equip one quiver.
|
||||
EQUIP_ERR_NO_BANK_SLOT = 34, // You must purchase that bag slot first
|
||||
EQUIP_ERR_NO_BANK_HERE = 35, // You are too far away from a bank.
|
||||
EQUIP_ERR_ITEM_LOCKED = 36, // Item is locked.
|
||||
EQUIP_ERR_GENERIC_STUNNED = 37, // You are stunned
|
||||
EQUIP_ERR_PLAYER_DEAD = 38, // You can't do that when you're dead.
|
||||
EQUIP_ERR_CLIENT_LOCKED_OUT = 39, // You can't do that right now.
|
||||
EQUIP_ERR_INTERNAL_BAG_ERROR = 40, // Internal Bag Error
|
||||
EQUIP_ERR_ONLY_ONE_BOLT = 41, // You can only equip one quiver.
|
||||
EQUIP_ERR_ONLY_ONE_AMMO = 42, // You can only equip one ammo pouch.
|
||||
EQUIP_ERR_CANT_WRAP_STACKABLE = 43, // Stackable items can't be wrapped.
|
||||
EQUIP_ERR_CANT_WRAP_EQUIPPED = 44, // Equipped items can't be wrapped.
|
||||
EQUIP_ERR_CANT_WRAP_WRAPPED = 45, // Wrapped items can't be wrapped.
|
||||
EQUIP_ERR_CANT_WRAP_BOUND = 46, // Bound items can't be wrapped.
|
||||
EQUIP_ERR_CANT_WRAP_UNIQUE = 47, // Unique items can't be wrapped.
|
||||
EQUIP_ERR_CANT_WRAP_BAGS = 48, // Bags can't be wrapped.
|
||||
EQUIP_ERR_LOOT_GONE = 49, // Already looted
|
||||
EQUIP_ERR_INV_FULL = 50, // Inventory is full.
|
||||
EQUIP_ERR_BANK_FULL = 51, // Your bank is full
|
||||
EQUIP_ERR_VENDOR_SOLD_OUT = 52, // That item is currently sold out.
|
||||
EQUIP_ERR_BAG_FULL_2 = 53, // That bag is full.
|
||||
EQUIP_ERR_ITEM_NOT_FOUND_2 = 54, // The item was not found.
|
||||
EQUIP_ERR_CANT_STACK_2 = 55, // This item cannot stack.
|
||||
EQUIP_ERR_BAG_FULL_3 = 56, // That bag is full.
|
||||
EQUIP_ERR_VENDOR_SOLD_OUT_2 = 57, // That item is currently sold out.
|
||||
EQUIP_ERR_OBJECT_IS_BUSY = 58, // That object is busy.
|
||||
EQUIP_ERR_CANT_BE_DISENCHANTED = 59,
|
||||
EQUIP_ERR_NOT_IN_COMBAT = 60, // You can't do that while in combat
|
||||
EQUIP_ERR_NOT_WHILE_DISARMED = 61, // You can't do that while disarmed
|
||||
EQUIP_ERR_BAG_FULL_4 = 62, // That bag is full.
|
||||
EQUIP_ERR_CANT_EQUIP_RANK = 63, // You don't have the required rank for that item
|
||||
EQUIP_ERR_CANT_EQUIP_REPUTATION = 64, // You don't have the required reputation for that item
|
||||
EQUIP_ERR_TOO_MANY_SPECIAL_BAGS = 65, // You cannot equip another bag of that type
|
||||
EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW = 66, // You can't loot that item now.
|
||||
EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE = 67, // You cannot equip more than one of those.
|
||||
EQUIP_ERR_VENDOR_MISSING_TURNINS = 68, // You do not have the required items for that purchase
|
||||
EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS = 69, // You don't have enough honor points
|
||||
EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS = 70, // You don't have enough arena points
|
||||
EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED = 71, // You have the maximum number of those gems in your inventory or socketed into items.
|
||||
EQUIP_ERR_MAIL_BOUND_ITEM = 72, // You can't mail soulbound items.
|
||||
EQUIP_ERR_INTERNAL_BAG_ERROR_2 = 73, // Internal Bag Error
|
||||
EQUIP_ERR_BAG_FULL_5 = 74, // That bag is full.
|
||||
EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED = 75, // You have the maximum number of those gems socketed into equipped items.
|
||||
EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED = 76, // You cannot socket more than one of those gems into a single item.
|
||||
EQUIP_ERR_TOO_MUCH_GOLD = 77, // At gold limit
|
||||
EQUIP_ERR_NOT_DURING_ARENA_MATCH = 78, // You can't do that while in an arena match
|
||||
EQUIP_ERR_TRADE_BOUND_ITEM = 79, // You can't trade a soulbound item.
|
||||
EQUIP_ERR_CANT_EQUIP_RATING = 80, // You don't have the personal, team, or battleground rating required to buy that item
|
||||
EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM = 81,
|
||||
EQUIP_ERR_NOT_SAME_ACCOUNT = 82, // Account-bound items can only be given to your own characters.
|
||||
EQUIP_ERR_NO_OUTPUT = 83,
|
||||
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS = 84, // You can only carry %d %s
|
||||
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED_IS = 85, // You can only equip %d |4item:items in the %s category
|
||||
EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED = 86, // Your level is too high to use that item
|
||||
EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW = 87, // You must reach level %d to purchase that item.
|
||||
EQUIP_ERR_CANT_EQUIP_NEED_TALENT = 88, // You do not have the required talent to equip that.
|
||||
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS = 89, // You can only equip %d |4item:items in the %s category
|
||||
EQUIP_ERR_SHAPESHIFT_FORM_CANNOT_EQUIP = 90, // Cannot equip item in this form
|
||||
EQUIP_ERR_ITEM_INVENTORY_FULL_SATCHEL = 91, // Your inventory is full. Your satchel has been delivered to your mailbox.
|
||||
EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_TOO_LOW = 92, // Your level is too low to use that item
|
||||
EQUIP_ERR_CANT_BUY_QUANTITY = 93, // You can't buy the specified quantity of that item.
|
||||
EQUIP_ERR_ITEM_IS_BATTLE_PAY_LOCKED = 94, // Your purchased item is still waiting to be unlocked
|
||||
EQUIP_ERR_REAGENT_BANK_FULL = 95, // Your reagent bank is full
|
||||
EQUIP_ERR_REAGENT_BANK_LOCKED = 96,
|
||||
EQUIP_ERR_WRONG_BAG_TYPE_3 = 97,
|
||||
EQUIP_ERR_CANT_USE_ITEM = 98, // You can't use that item.
|
||||
EQUIP_ERR_CANT_BE_OBLITERATED = 99, // You can't obliterate that item
|
||||
EQUIP_ERR_GUILD_BANK_CONJURED_ITEM = 100,// You cannot store conjured items in the guild bank
|
||||
};
|
||||
|
||||
enum BuyResult
|
||||
{
|
||||
BUY_ERR_CANT_FIND_ITEM = 0,
|
||||
BUY_ERR_ITEM_ALREADY_SOLD = 1,
|
||||
BUY_ERR_NOT_ENOUGHT_MONEY = 2,
|
||||
BUY_ERR_SELLER_DONT_LIKE_YOU = 4,
|
||||
BUY_ERR_DISTANCE_TOO_FAR = 5,
|
||||
BUY_ERR_ITEM_SOLD_OUT = 7,
|
||||
BUY_ERR_CANT_CARRY_MORE = 8,
|
||||
BUY_ERR_RANK_REQUIRE = 11,
|
||||
BUY_ERR_REPUTATION_REQUIRE = 12
|
||||
};
|
||||
|
||||
enum SellResult
|
||||
{
|
||||
SELL_ERR_CANT_FIND_ITEM = 1,
|
||||
SELL_ERR_CANT_SELL_ITEM = 2, // merchant doesn't like that item
|
||||
SELL_ERR_CANT_FIND_VENDOR = 3, // merchant doesn't like you
|
||||
SELL_ERR_YOU_DONT_OWN_THAT_ITEM = 4, // you don't own that item
|
||||
SELL_ERR_UNK = 5, // nothing appears...
|
||||
SELL_ERR_ONLY_EMPTY_BAG = 6 // can only do with empty bags
|
||||
};
|
||||
|
||||
// -1 from client enchantment slot number
|
||||
enum EnchantmentSlot : uint16
|
||||
{
|
||||
PERM_ENCHANTMENT_SLOT = 0,
|
||||
TEMP_ENCHANTMENT_SLOT = 1,
|
||||
SOCK_ENCHANTMENT_SLOT = 2,
|
||||
SOCK_ENCHANTMENT_SLOT_2 = 3,
|
||||
SOCK_ENCHANTMENT_SLOT_3 = 4,
|
||||
BONUS_ENCHANTMENT_SLOT = 5,
|
||||
PRISMATIC_ENCHANTMENT_SLOT = 6, // added at apply special permanent enchantment
|
||||
USE_ENCHANTMENT_SLOT = 7,
|
||||
|
||||
MAX_INSPECTED_ENCHANTMENT_SLOT = 8,
|
||||
|
||||
PROP_ENCHANTMENT_SLOT_0 = 8, // used with RandomSuffix
|
||||
PROP_ENCHANTMENT_SLOT_1 = 9, // used with RandomSuffix
|
||||
PROP_ENCHANTMENT_SLOT_2 = 10, // used with RandomSuffix and RandomProperty
|
||||
PROP_ENCHANTMENT_SLOT_3 = 11, // used with RandomProperty
|
||||
PROP_ENCHANTMENT_SLOT_4 = 12, // used with RandomProperty
|
||||
MAX_ENCHANTMENT_SLOT = 13
|
||||
};
|
||||
|
||||
#define MAX_VISIBLE_ITEM_OFFSET 2 // 2 fields per visible item (entry+enchantment)
|
||||
|
||||
enum ItemVendorType
|
||||
{
|
||||
ITEM_VENDOR_TYPE_NONE = 0,
|
||||
ITEM_VENDOR_TYPE_ITEM = 1,
|
||||
ITEM_VENDOR_TYPE_CURRENCY = 2,
|
||||
};
|
||||
|
||||
enum ItemModifier : uint16
|
||||
{
|
||||
ITEM_MODIFIER_TRANSMOG_APPEARANCE_ALL_SPECS = 0,
|
||||
ITEM_MODIFIER_TRANSMOG_APPEARANCE_SPEC_1 = 1,
|
||||
ITEM_MODIFIER_UPGRADE_ID = 2,
|
||||
ITEM_MODIFIER_BATTLE_PET_SPECIES_ID = 3,
|
||||
ITEM_MODIFIER_BATTLE_PET_BREED_DATA = 4, // (breedId) | (breedQuality << 24)
|
||||
ITEM_MODIFIER_BATTLE_PET_LEVEL = 5,
|
||||
ITEM_MODIFIER_BATTLE_PET_DISPLAY_ID = 6,
|
||||
ITEM_MODIFIER_ENCHANT_ILLUSION_ALL_SPECS = 7,
|
||||
ITEM_MODIFIER_ARTIFACT_APPEARANCE_ID = 8,
|
||||
ITEM_MODIFIER_SCALING_STAT_DISTRIBUTION_FIXED_LEVEL = 9,
|
||||
ITEM_MODIFIER_ENCHANT_ILLUSION_SPEC_1 = 10,
|
||||
ITEM_MODIFIER_TRANSMOG_APPEARANCE_SPEC_2 = 11,
|
||||
ITEM_MODIFIER_ENCHANT_ILLUSION_SPEC_2 = 12,
|
||||
ITEM_MODIFIER_TRANSMOG_APPEARANCE_SPEC_3 = 13,
|
||||
ITEM_MODIFIER_ENCHANT_ILLUSION_SPEC_3 = 14,
|
||||
ITEM_MODIFIER_TRANSMOG_APPEARANCE_SPEC_4 = 15,
|
||||
ITEM_MODIFIER_ENCHANT_ILLUSION_SPEC_4 = 16,
|
||||
ITEM_MODIFIER_CHALLENGE_MAP_CHALLENGE_MODE_ID = 17,
|
||||
ITEM_MODIFIER_CHALLENGE_KEYSTONE_LEVEL = 18,
|
||||
ITEM_MODIFIER_CHALLENGE_KEYSTONE_AFFIX_ID_1 = 19,
|
||||
ITEM_MODIFIER_CHALLENGE_KEYSTONE_AFFIX_ID_2 = 20,
|
||||
ITEM_MODIFIER_CHALLENGE_KEYSTONE_AFFIX_ID_3 = 21,
|
||||
ITEM_MODIFIER_CHALLENGE_KEYSTONE_IS_CHARGED = 22,
|
||||
ITEM_MODIFIER_ARTIFACT_KNOWLEDGE_LEVEL = 23,
|
||||
ITEM_MODIFIER_ARTIFACT_TIER = 24,
|
||||
|
||||
MAX_ITEM_MODIFIERS
|
||||
};
|
||||
|
||||
#endif // ItemDefines_h__
|
||||
@@ -293,13 +293,6 @@ enum CurrencyCategory
|
||||
// ...
|
||||
};
|
||||
|
||||
enum ItemVendorType
|
||||
{
|
||||
ITEM_VENDOR_TYPE_NONE = 0,
|
||||
ITEM_VENDOR_TYPE_ITEM = 1,
|
||||
ITEM_VENDOR_TYPE_CURRENCY = 2,
|
||||
};
|
||||
|
||||
enum BAG_FAMILY_MASK
|
||||
{
|
||||
BAG_FAMILY_MASK_NONE = 0x00000000,
|
||||
@@ -348,7 +341,7 @@ extern uint32 const SocketColorToGemTypeMask[19];
|
||||
|
||||
#define SOCKET_COLOR_STANDARD (SOCKET_COLOR_RED | SOCKET_COLOR_YELLOW | SOCKET_COLOR_BLUE)
|
||||
|
||||
enum InventoryType
|
||||
enum InventoryType : uint8
|
||||
{
|
||||
INVTYPE_NON_EQUIP = 0,
|
||||
INVTYPE_HEAD = 1,
|
||||
@@ -814,7 +807,4 @@ struct TC_GAME_API ItemTemplate
|
||||
static std::size_t CalculateItemSpecBit(ChrSpecializationEntry const* spec);
|
||||
};
|
||||
|
||||
// Benchmarked: Faster than std::map (insert/find)
|
||||
typedef std::unordered_map<uint32, ItemTemplate> ItemTemplateContainer;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -17,35 +17,37 @@
|
||||
*/
|
||||
|
||||
#include "Object.h"
|
||||
#include "Common.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Log.h"
|
||||
#include "World.h"
|
||||
#include "Creature.h"
|
||||
#include "Player.h"
|
||||
#include "Vehicle.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "UpdateData.h"
|
||||
#include "Util.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Transport.h"
|
||||
#include "VMapFactory.h"
|
||||
#include "AreaTriggerTemplate.h"
|
||||
#include "BattlefieldMgr.h"
|
||||
#include "CellImpl.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "CinematicMgr.h"
|
||||
#include "Common.h"
|
||||
#include "Creature.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "InstanceScenario.h"
|
||||
#include "Item.h"
|
||||
#include "Log.h"
|
||||
#include "MiscPackets.h"
|
||||
#include "MovementPackets.h"
|
||||
#include "MovementTypedefs.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "Player.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "UpdateFieldFlags.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "Totem.h"
|
||||
#include "MovementPackets.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "Transport.h"
|
||||
#include "Unit.h"
|
||||
#include "BattlefieldMgr.h"
|
||||
#include "MiscPackets.h"
|
||||
#include "InstanceScenario.h"
|
||||
#include "AreaTriggerTemplate.h"
|
||||
#include "UpdateData.h"
|
||||
#include "UpdateFieldFlags.h"
|
||||
#include "Util.h"
|
||||
#include "VMapFactory.h"
|
||||
#include "Vehicle.h"
|
||||
#include "World.h"
|
||||
#include "WorldSession.h"
|
||||
#include <G3D/Vector3.h>
|
||||
|
||||
Object::Object()
|
||||
{
|
||||
@@ -258,7 +260,7 @@ void Object::SendUpdateToPlayer(Player* player)
|
||||
else
|
||||
BuildCreateUpdateBlockForPlayer(&upd, player);
|
||||
upd.BuildPacket(&packet);
|
||||
player->GetSession()->SendPacket(&packet);
|
||||
player->SendDirectMessage(&packet);
|
||||
}
|
||||
|
||||
void Object::BuildValuesUpdateBlockForPlayer(UpdateData* data, Player* target) const
|
||||
@@ -569,15 +571,10 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
|
||||
if (hasAreaTriggerSpline)
|
||||
{
|
||||
std::vector<G3D::Vector3> const& splinePoints = areaTrigger->GetSpline().getPoints();
|
||||
|
||||
*data << uint32(areaTrigger->GetTimeToTarget());
|
||||
*data << uint32(areaTrigger->GetElapsedTimeForMovement());
|
||||
|
||||
data->WriteBits(splinePoints.size(), 16);
|
||||
|
||||
for (G3D::Vector3 const& spline : splinePoints)
|
||||
*data << spline.x << spline.y << spline.z;
|
||||
WorldPackets::Movement::CommonMovement::WriteCreateObjectAreaTriggerSpline(areaTrigger->GetSpline(), *data);
|
||||
}
|
||||
|
||||
if (hasTargetRollPitchYaw)
|
||||
@@ -624,11 +621,11 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint32 flags) const
|
||||
*data << float(areaTriggerTemplate->PolygonDatas.Height);
|
||||
*data << float(areaTriggerTemplate->PolygonDatas.HeightTarget);
|
||||
|
||||
for (G3D::Vector2 const& vertice : areaTriggerTemplate->PolygonVertices)
|
||||
*data << vertice.x << vertice.y;
|
||||
for (TaggedPosition<Position::XY> const& vertice : areaTriggerTemplate->PolygonVertices)
|
||||
*data << vertice;
|
||||
|
||||
for (G3D::Vector2 const& vertice : areaTriggerTemplate->PolygonVerticesTarget)
|
||||
*data << vertice.x << vertice.y;
|
||||
for (TaggedPosition<Position::XY> const& vertice : areaTriggerTemplate->PolygonVerticesTarget)
|
||||
*data << vertice;
|
||||
}
|
||||
|
||||
if (hasAreaTriggerCylinder)
|
||||
|
||||
@@ -19,10 +19,11 @@
|
||||
#include "Pet.h"
|
||||
#include "Common.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Group.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "PetPackets.h"
|
||||
#include "Player.h"
|
||||
#include "Spell.h"
|
||||
@@ -34,7 +35,6 @@
|
||||
#include "Unit.h"
|
||||
#include "Util.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
#define PET_XP_FACTOR 0.05f
|
||||
|
||||
@@ -16,8 +16,9 @@
|
||||
*/
|
||||
|
||||
#include "CinematicMgr.h"
|
||||
#include "Creature.h"
|
||||
#include "M2Stores.h"
|
||||
#include "Map.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "Player.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
#include "KillRewarder.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "Creature.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Formulas.h"
|
||||
#include "Group.h"
|
||||
#include "Guild.h"
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "Pet.h"
|
||||
#include "Player.h"
|
||||
#include "Scenario.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
|
||||
// == KillRewarder ====================================================
|
||||
// KillRewarder encapsulates logic of rewarding player upon kill with:
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "AchievementMgr.h"
|
||||
#include "ArenaTeam.h"
|
||||
#include "ArenaTeamMgr.h"
|
||||
#include "Bag.h"
|
||||
#include "Battlefield.h"
|
||||
#include "BattlefieldMgr.h"
|
||||
#include "BattlefieldTB.h"
|
||||
@@ -39,6 +40,7 @@
|
||||
#include "CharacterPackets.h"
|
||||
#include "Chat.h"
|
||||
#include "ChatPackets.h"
|
||||
#include "CinematicMgr.h"
|
||||
#include "CombatLogPackets.h"
|
||||
#include "CombatPackets.h"
|
||||
#include "Common.h"
|
||||
@@ -71,9 +73,11 @@
|
||||
#include "Log.h"
|
||||
#include "LootMgr.h"
|
||||
#include "LootPackets.h"
|
||||
#include "Mail.h"
|
||||
#include "MailPackets.h"
|
||||
#include "MapManager.h"
|
||||
#include "MiscPackets.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "MovementPackets.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
@@ -98,6 +102,7 @@
|
||||
#include "SpellPackets.h"
|
||||
#include "TalentPackets.h"
|
||||
#include "ToyPackets.h"
|
||||
#include "TradeData.h"
|
||||
#include "TransmogrificationPackets.h"
|
||||
#include "Transport.h"
|
||||
#include "UpdateData.h"
|
||||
@@ -111,6 +116,7 @@
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include "WorldStatePackets.h"
|
||||
#include <G3D/g3dmath.h>
|
||||
|
||||
#define ZONE_UPDATE_INTERVAL (1*IN_MILLISECONDS)
|
||||
|
||||
@@ -10038,6 +10044,11 @@ InventoryResult Player::CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item
|
||||
return EQUIP_ERR_OK;
|
||||
}
|
||||
|
||||
InventoryResult Player::CanTakeMoreSimilarItems(Item* pItem, uint32* offendingItemId /*= nullptr*/) const
|
||||
{
|
||||
return CanTakeMoreSimilarItems(pItem->GetEntry(), pItem->GetCount(), pItem, nullptr, offendingItemId);
|
||||
}
|
||||
|
||||
InventoryResult Player::CanStoreNewItem(uint8 bag, uint8 slot, ItemPosCountVec& dest, uint32 item, uint32 count, uint32* no_space_count /*= NULL*/) const
|
||||
{
|
||||
return CanStoreItem(bag, slot, dest, item, count, nullptr, false, no_space_count);
|
||||
@@ -12138,7 +12149,7 @@ void Player::MoveItemFromInventory(uint8 bag, uint8 slot, bool update)
|
||||
ItemRemovedQuestCheck(it->GetEntry(), it->GetCount());
|
||||
RemoveItem(bag, slot, update);
|
||||
it->SetNotRefundable(this, false, nullptr, false);
|
||||
it->RemoveFromUpdateQueueOf(this);
|
||||
RemoveItemFromUpdateQueueOf(it, this);
|
||||
GetSession()->GetCollectionMgr()->RemoveTemporaryAppearance(it);
|
||||
if (it->IsInWorld())
|
||||
{
|
||||
@@ -19085,13 +19096,10 @@ void Player::_LoadGroup(PreparedQueryResult result)
|
||||
SetGroup(group, subgroup);
|
||||
SetPartyType(group->GetGroupCategory(), GROUP_TYPE_NORMAL);
|
||||
ResetGroupUpdateSequenceIfNeeded(group);
|
||||
if (getLevel() >= LEVELREQUIREMENT_HEROIC)
|
||||
{
|
||||
// the group leader may change the instance difficulty while the player is offline
|
||||
SetDungeonDifficultyID(group->GetDungeonDifficultyID());
|
||||
SetRaidDifficultyID(group->GetRaidDifficultyID());
|
||||
SetLegacyRaidDifficultyID(group->GetLegacyRaidDifficultyID());
|
||||
}
|
||||
// the group leader may change the instance difficulty while the player is offline
|
||||
SetDungeonDifficultyID(group->GetDungeonDifficultyID());
|
||||
SetRaidDifficultyID(group->GetRaidDifficultyID());
|
||||
SetLegacyRaidDifficultyID(group->GetLegacyRaidDifficultyID());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21413,6 +21421,65 @@ bool Player::IsAffectedBySpellmod(SpellInfo const* spellInfo, SpellModifier* mod
|
||||
return spellInfo->IsAffectedBySpellMod(mod);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void Player::ApplySpellMod(uint32 spellId, SpellModOp op, T& basevalue, Spell* spell /*= nullptr*/)
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
if (!spellInfo)
|
||||
return;
|
||||
|
||||
float totalmul = 1.0f;
|
||||
int32 totalflat = 0;
|
||||
|
||||
// Drop charges for triggering spells instead of triggered ones
|
||||
if (m_spellModTakingSpell)
|
||||
spell = m_spellModTakingSpell;
|
||||
|
||||
for (SpellModList::iterator itr = m_spellMods[op][SPELLMOD_FLAT].begin(); itr != m_spellMods[op][SPELLMOD_FLAT].end(); ++itr)
|
||||
{
|
||||
SpellModifier* mod = *itr;
|
||||
|
||||
// Charges can be set only for mods with auras
|
||||
if (!mod->ownerAura)
|
||||
ASSERT(mod->charges == 0);
|
||||
|
||||
if (!IsAffectedBySpellmod(spellInfo, mod, spell))
|
||||
continue;
|
||||
|
||||
totalflat += mod->value;
|
||||
DropModCharge(mod, spell);
|
||||
}
|
||||
|
||||
for (SpellModList::iterator itr = m_spellMods[op][SPELLMOD_PCT].begin(); itr != m_spellMods[op][SPELLMOD_PCT].end(); ++itr)
|
||||
{
|
||||
SpellModifier* mod = *itr;
|
||||
|
||||
// Charges can be set only for mods with auras
|
||||
if (!mod->ownerAura)
|
||||
ASSERT(mod->charges == 0);
|
||||
|
||||
if (!IsAffectedBySpellmod(spellInfo, mod, spell))
|
||||
continue;
|
||||
|
||||
// skip percent mods for null basevalue (most important for spell mods with charges)
|
||||
if (basevalue + totalflat == T(0))
|
||||
continue;
|
||||
|
||||
// special case (skip > 10sec spell casts for instant cast setting)
|
||||
if (mod->op == SPELLMOD_CASTING_TIME && basevalue >= T(10000) && mod->value <= -100)
|
||||
continue;
|
||||
|
||||
totalmul *= 1.0f + CalculatePct(1.0f, mod->value);
|
||||
DropModCharge(mod, spell);
|
||||
}
|
||||
|
||||
basevalue = T(float(basevalue + totalflat) * totalmul);
|
||||
}
|
||||
|
||||
template TC_GAME_API void Player::ApplySpellMod(uint32 spellId, SpellModOp op, int32& basevalue, Spell* spell);
|
||||
template TC_GAME_API void Player::ApplySpellMod(uint32 spellId, SpellModOp op, uint32& basevalue, Spell* spell);
|
||||
template TC_GAME_API void Player::ApplySpellMod(uint32 spellId, SpellModOp op, float& basevalue, Spell* spell);
|
||||
|
||||
void Player::AddSpellMod(SpellModifier* mod, bool apply)
|
||||
{
|
||||
TC_LOG_DEBUG("spells", "Player::AddSpellMod: Player '%s' (%s), SpellID: %d", GetName().c_str(), GetGUID().ToString().c_str(), mod->spellId);
|
||||
@@ -24158,6 +24225,11 @@ float Player::GetReputationPriceDiscount(Creature const* creature) const
|
||||
return 1.0f - 0.05f* (rank - REP_NEUTRAL);
|
||||
}
|
||||
|
||||
Player* Player::GetTrader() const
|
||||
{
|
||||
return m_trade ? m_trade->GetTrader() : nullptr;
|
||||
}
|
||||
|
||||
bool Player::IsSpellFitByClassAndRace(uint32 spell_id) const
|
||||
{
|
||||
uint32 racemask = getRaceMask();
|
||||
@@ -25241,6 +25313,11 @@ bool Player::HasTitle(uint32 bitIndex) const
|
||||
return HasFlag(PLAYER__FIELD_KNOWN_TITLES + fieldIndexOffset, flag);
|
||||
}
|
||||
|
||||
bool Player::HasTitle(CharTitlesEntry const* title) const
|
||||
{
|
||||
return HasTitle(title->MaskID);
|
||||
}
|
||||
|
||||
void Player::SetTitle(CharTitlesEntry const* title, bool lost)
|
||||
{
|
||||
uint32 fieldIndexOffset = title->MaskID / 32;
|
||||
|
||||
@@ -19,47 +19,80 @@
|
||||
#ifndef _PLAYER_H
|
||||
#define _PLAYER_H
|
||||
|
||||
#include "DB2Stores.h"
|
||||
#include "GroupReference.h"
|
||||
#include "MapReference.h"
|
||||
#include "CUFProfile.h"
|
||||
#include "EquipementSet.h"
|
||||
#include "Item.h"
|
||||
#include "PetDefines.h"
|
||||
#include "QuestDef.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellHistory.h"
|
||||
#include "Unit.h"
|
||||
#include "WorldSession.h"
|
||||
#include "CUFProfile.h"
|
||||
#include "DatabaseEnvFwd.h"
|
||||
#include "DBCEnums.h"
|
||||
#include "EquipementSet.h"
|
||||
#include "GroupReference.h"
|
||||
#include "ItemDefines.h"
|
||||
#include "ItemEnchantmentMgr.h"
|
||||
#include "MapReference.h"
|
||||
#include "PetDefines.h"
|
||||
#include "PlayerTaxi.h"
|
||||
#include "TradeData.h"
|
||||
#include "CinematicMgr.h"
|
||||
#include "QuestDef.h"
|
||||
#include "SceneMgr.h"
|
||||
#include <queue>
|
||||
|
||||
struct AccessRequirement;
|
||||
struct AchievementEntry;
|
||||
struct AreaTableEntry;
|
||||
struct AreaTriggerEntry;
|
||||
struct ArtifactPowerRankEntry;
|
||||
struct BarberShopStyleEntry;
|
||||
struct CharTitlesEntry;
|
||||
struct ChatChannelsEntry;
|
||||
struct ChrSpecializationEntry;
|
||||
struct CreatureTemplate;
|
||||
struct Mail;
|
||||
struct CurrencyTypesEntry;
|
||||
struct FactionEntry;
|
||||
struct ItemExtendedCostEntry;
|
||||
struct ItemSetEffect;
|
||||
struct ItemTemplate;
|
||||
struct Loot;
|
||||
struct Mail;
|
||||
struct MapEntry;
|
||||
struct QuestPackageItemEntry;
|
||||
struct SkillRaceClassInfoEntry;
|
||||
struct TalentEntry;
|
||||
struct TrainerSpell;
|
||||
struct VendorItem;
|
||||
|
||||
class PlayerAchievementMgr;
|
||||
class ReputationMgr;
|
||||
class AELootResult;
|
||||
class Bag;
|
||||
class Battleground;
|
||||
class Channel;
|
||||
class CinematicMgr;
|
||||
class Creature;
|
||||
class DynamicObject;
|
||||
class Garrison;
|
||||
class Group;
|
||||
class Guild;
|
||||
class Item;
|
||||
class LootStore;
|
||||
class OutdoorPvP;
|
||||
class Pet;
|
||||
class PlayerAI;
|
||||
class PlayerAchievementMgr;
|
||||
class PlayerMenu;
|
||||
class PlayerSocial;
|
||||
class ReputationMgr;
|
||||
class SpellCastTargets;
|
||||
class PlayerAI;
|
||||
class TradeData;
|
||||
|
||||
enum GroupCategory : uint8;
|
||||
enum InventoryType : uint8;
|
||||
enum ItemClass : uint8;
|
||||
enum LootError : uint8;
|
||||
enum LootType : uint8;
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
namespace Character
|
||||
{
|
||||
struct CharacterCreateInfo;
|
||||
}
|
||||
}
|
||||
|
||||
typedef std::deque<Mail*> PlayerMails;
|
||||
|
||||
@@ -1021,8 +1054,8 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
{
|
||||
friend class WorldSession;
|
||||
friend class CinematicMgr;
|
||||
friend void Item::AddToUpdateQueueOf(Player* player);
|
||||
friend void Item::RemoveFromUpdateQueueOf(Player* player);
|
||||
friend void AddItemToUpdateQueueOf(Item* item, Player* player);
|
||||
friend void RemoveItemFromUpdateQueueOf(Item* item, Player* player);
|
||||
public:
|
||||
explicit Player(WorldSession* session);
|
||||
~Player();
|
||||
@@ -1183,7 +1216,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
bool CanNoReagentCast(SpellInfo const* spellInfo) const;
|
||||
bool HasItemOrGemWithIdEquipped(uint32 item, uint32 count, uint8 except_slot = NULL_SLOT) const;
|
||||
bool HasItemOrGemWithLimitCategoryEquipped(uint32 limitCategory, uint32 count, uint8 except_slot = NULL_SLOT) const;
|
||||
InventoryResult CanTakeMoreSimilarItems(Item* pItem, uint32* offendingItemId = nullptr) const { return CanTakeMoreSimilarItems(pItem->GetEntry(), pItem->GetCount(), pItem, nullptr, offendingItemId); }
|
||||
InventoryResult CanTakeMoreSimilarItems(Item* pItem, uint32* offendingItemId = nullptr) const;
|
||||
InventoryResult CanTakeMoreSimilarItems(uint32 entry, uint32 count, uint32* offendingItemId = nullptr) const { return CanTakeMoreSimilarItems(entry, count, nullptr, nullptr, offendingItemId); }
|
||||
InventoryResult CanStoreNewItem(uint8 bag, uint8 slot, ItemPosCountVec& dest, uint32 item, uint32 count, uint32* no_space_count = nullptr) const;
|
||||
InventoryResult CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec& dest, Item* pItem, bool swap = false) const;
|
||||
@@ -1288,7 +1321,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
|
||||
float GetReputationPriceDiscount(Creature const* creature) const;
|
||||
|
||||
Player* GetTrader() const { return m_trade ? m_trade->GetTrader() : nullptr; }
|
||||
Player* GetTrader() const;
|
||||
TradeData* GetTradeData() const { return m_trade; }
|
||||
void TradeCancel(bool sendback);
|
||||
|
||||
@@ -2274,7 +2307,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
bool ModifierTreeSatisfied(uint32 modifierTreeId) const;
|
||||
|
||||
bool HasTitle(uint32 bitIndex) const;
|
||||
bool HasTitle(CharTitlesEntry const* title) const { return HasTitle(title->MaskID); }
|
||||
bool HasTitle(CharTitlesEntry const* title) const;
|
||||
void SetTitle(CharTitlesEntry const* title, bool lost = false);
|
||||
|
||||
//bool isActiveObject() const { return true; }
|
||||
@@ -2687,60 +2720,4 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
TC_GAME_API void AddItemsSetItem(Player* player, Item* item);
|
||||
TC_GAME_API void RemoveItemsSetItem(Player* player, ItemTemplate const* proto);
|
||||
|
||||
// "the bodies of template functions must be made available in a header file"
|
||||
template <class T>
|
||||
void Player::ApplySpellMod(uint32 spellId, SpellModOp op, T& basevalue, Spell* spell /*= nullptr*/)
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
if (!spellInfo)
|
||||
return;
|
||||
|
||||
float totalmul = 1.0f;
|
||||
int32 totalflat = 0;
|
||||
|
||||
// Drop charges for triggering spells instead of triggered ones
|
||||
if (m_spellModTakingSpell)
|
||||
spell = m_spellModTakingSpell;
|
||||
|
||||
for (SpellModList::iterator itr = m_spellMods[op][SPELLMOD_FLAT].begin(); itr != m_spellMods[op][SPELLMOD_FLAT].end(); ++itr)
|
||||
{
|
||||
SpellModifier* mod = *itr;
|
||||
|
||||
// Charges can be set only for mods with auras
|
||||
if (!mod->ownerAura)
|
||||
ASSERT(mod->charges == 0);
|
||||
|
||||
if (!IsAffectedBySpellmod(spellInfo, mod, spell))
|
||||
continue;
|
||||
|
||||
totalflat += mod->value;
|
||||
DropModCharge(mod, spell);
|
||||
}
|
||||
|
||||
for (SpellModList::iterator itr = m_spellMods[op][SPELLMOD_PCT].begin(); itr != m_spellMods[op][SPELLMOD_PCT].end(); ++itr)
|
||||
{
|
||||
SpellModifier* mod = *itr;
|
||||
|
||||
// Charges can be set only for mods with auras
|
||||
if (!mod->ownerAura)
|
||||
ASSERT(mod->charges == 0);
|
||||
|
||||
if (!IsAffectedBySpellmod(spellInfo, mod, spell))
|
||||
continue;
|
||||
|
||||
// skip percent mods for null basevalue (most important for spell mods with charges)
|
||||
if (basevalue + totalflat == T(0))
|
||||
continue;
|
||||
|
||||
// special case (skip > 10sec spell casts for instant cast setting)
|
||||
if (mod->op == SPELLMOD_CASTING_TIME && basevalue >= T(10000) && mod->value <= -100)
|
||||
continue;
|
||||
|
||||
totalmul *= 1.0f + CalculatePct(1.0f, mod->value);
|
||||
DropModCharge(mod, spell);
|
||||
}
|
||||
|
||||
basevalue = T(float(basevalue + totalflat) * totalmul);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -15,11 +15,12 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "PlayerTaxi.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "TaxiPackets.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include <limits>
|
||||
#include <math.h>
|
||||
#include <sstream>
|
||||
|
||||
void PlayerTaxi::InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint8 level)
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
#ifndef __PLAYERTAXI_H__
|
||||
#define __PLAYERTAXI_H__
|
||||
|
||||
#include "DB2Stores.h"
|
||||
#include "DBCEnums.h"
|
||||
#include "Define.h"
|
||||
#include "WorldSession.h"
|
||||
#include <map>
|
||||
#include <deque>
|
||||
#include <iosfwd>
|
||||
#include <vector>
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
namespace Taxi
|
||||
{
|
||||
class ShowTaxiNodes;
|
||||
}
|
||||
}
|
||||
|
||||
class TC_GAME_API PlayerTaxi
|
||||
{
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "SceneMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Language.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
@@ -62,7 +63,7 @@ uint32 SceneMgr::PlaySceneByTemplate(SceneTemplate const* sceneTemplate, Positio
|
||||
playScene.Location = *position;
|
||||
playScene.TransportGUID = GetPlayer()->GetTransGUID();
|
||||
|
||||
GetPlayer()->GetSession()->SendPacket(playScene.Write(), true);
|
||||
GetPlayer()->SendDirectMessage(playScene.Write());
|
||||
|
||||
AddInstanceIdToSceneMap(sceneInstanceID, sceneTemplate);
|
||||
|
||||
@@ -89,7 +90,7 @@ void SceneMgr::CancelScene(uint32 sceneInstanceID, bool removeFromMap /*= true*/
|
||||
|
||||
WorldPackets::Scenes::CancelScene cancelScene;
|
||||
cancelScene.SceneInstanceID = sceneInstanceID;
|
||||
GetPlayer()->GetSession()->SendPacket(cancelScene.Write(), true);
|
||||
GetPlayer()->SendDirectMessage(cancelScene.Write());
|
||||
}
|
||||
|
||||
void SceneMgr::OnSceneTrigger(uint32 sceneInstanceID, std::string const& triggerName)
|
||||
|
||||
@@ -16,9 +16,11 @@
|
||||
*/
|
||||
|
||||
#include "TradeData.h"
|
||||
#include "Item.h"
|
||||
#include "Player.h"
|
||||
#include "Random.h"
|
||||
#include "TradePackets.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
TradeData* TradeData::GetTraderData() const
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "Totem.h"
|
||||
#include "Group.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Map.h"
|
||||
#include "Player.h"
|
||||
#include "SpellHistory.h"
|
||||
#include "SpellMgr.h"
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
*/
|
||||
|
||||
#include "Unit.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Item.h"
|
||||
#include "Player.h"
|
||||
#include "Pet.h"
|
||||
#include "Creature.h"
|
||||
@@ -25,6 +27,7 @@
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "World.h"
|
||||
#include <G3D/g3dmath.h>
|
||||
#include <numeric>
|
||||
|
||||
inline bool _ModifyUInt32(bool apply, uint32& baseValue, int32& amount)
|
||||
@@ -553,7 +556,7 @@ void Player::UpdateMastery()
|
||||
if (G3D::fuzzyEq(mult, 0.0f))
|
||||
continue;
|
||||
|
||||
aura->GetEffect(effect->EffectIndex)->ChangeAmount(int32(value * effect->BonusCoefficient));
|
||||
aura->GetEffect(effect->EffectIndex)->ChangeAmount(int32(value * mult));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,12 +38,15 @@
|
||||
#include "Group.h"
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Item.h"
|
||||
#include "Log.h"
|
||||
#include "LootMgr.h"
|
||||
#include "LootPackets.h"
|
||||
#include "MiscPackets.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "MovementPackets.h"
|
||||
#include "MoveSpline.h"
|
||||
#include "MoveSplineInit.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
@@ -10845,6 +10848,11 @@ void Unit::SendPetAIReaction(ObjectGuid guid)
|
||||
owner->ToPlayer()->SendDirectMessage(packet.Write());
|
||||
}
|
||||
|
||||
void Unit::propagateSpeedChange()
|
||||
{
|
||||
GetMotionMaster()->propagateSpeedChange();
|
||||
}
|
||||
|
||||
///----------End of Pet responses methods----------
|
||||
|
||||
void Unit::StopMoving()
|
||||
|
||||
@@ -19,19 +19,19 @@
|
||||
#ifndef __UNIT_H
|
||||
#define __UNIT_H
|
||||
|
||||
#include "UnitDefines.h"
|
||||
#include "Object.h"
|
||||
#include "EventProcessor.h"
|
||||
#include "FollowerReference.h"
|
||||
#include "FollowerRefManager.h"
|
||||
#include "HostileRefManager.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "Object.h"
|
||||
#include "SpellAuraDefines.h"
|
||||
#include "ThreatManager.h"
|
||||
#include "MoveSplineInit.h"
|
||||
#include "Timer.h"
|
||||
#include "UnitDefines.h"
|
||||
#include "Util.h"
|
||||
#include <boost/container/flat_set.hpp>
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
|
||||
#define WORLD_TRIGGER 12999
|
||||
#define ARTIFACTS_ALL_WEAPONS_GENERAL_WEAPON_EQUIPPED_PASSIVE 197886
|
||||
@@ -275,32 +275,34 @@ struct LiquidTypeEntry;
|
||||
struct MountCapabilityEntry;
|
||||
struct SpellValue;
|
||||
|
||||
class AuraApplication;
|
||||
class Aura;
|
||||
class UnitAura;
|
||||
class AuraApplication;
|
||||
class AuraEffect;
|
||||
class Creature;
|
||||
class Spell;
|
||||
class SpellInfo;
|
||||
class SpellEffectInfo;
|
||||
class SpellHistory;
|
||||
class DynamicObject;
|
||||
class GameObject;
|
||||
class Guardian;
|
||||
class Item;
|
||||
class Minion;
|
||||
class MotionMaster;
|
||||
class Pet;
|
||||
class PetAura;
|
||||
class Minion;
|
||||
class Guardian;
|
||||
class UnitAI;
|
||||
class Spell;
|
||||
class SpellCastTargets;
|
||||
class SpellEffectInfo;
|
||||
class SpellHistory;
|
||||
class SpellInfo;
|
||||
class Totem;
|
||||
class Transport;
|
||||
class TransportBase;
|
||||
class UnitAI;
|
||||
class UnitAura;
|
||||
class Vehicle;
|
||||
class VehicleJoinEvent;
|
||||
class TransportBase;
|
||||
class SpellCastTargets;
|
||||
namespace Movement
|
||||
{
|
||||
class MoveSpline;
|
||||
struct SpellEffectExtraData;
|
||||
}
|
||||
namespace WorldPackets
|
||||
{
|
||||
@@ -819,33 +821,6 @@ enum CurrentSpellTypes : uint8
|
||||
#define CURRENT_FIRST_NON_MELEE_SPELL 1
|
||||
#define CURRENT_MAX_SPELL 4
|
||||
|
||||
enum ActiveStates
|
||||
{
|
||||
ACT_PASSIVE = 0x01, // 0x01 - passive
|
||||
ACT_DISABLED = 0x81, // 0x80 - castable
|
||||
ACT_ENABLED = 0xC1, // 0x40 | 0x80 - auto cast + castable
|
||||
ACT_COMMAND = 0x07, // 0x01 | 0x02 | 0x04
|
||||
ACT_REACTION = 0x06, // 0x02 | 0x04
|
||||
ACT_DECIDE = 0x00 // custom
|
||||
};
|
||||
|
||||
enum ReactStates
|
||||
{
|
||||
REACT_PASSIVE = 0,
|
||||
REACT_DEFENSIVE = 1,
|
||||
REACT_AGGRESSIVE = 2,
|
||||
REACT_ASSIST = 3
|
||||
};
|
||||
|
||||
enum CommandStates : uint8
|
||||
{
|
||||
COMMAND_STAY = 0,
|
||||
COMMAND_FOLLOW = 1,
|
||||
COMMAND_ATTACK = 2,
|
||||
COMMAND_ABANDON = 3,
|
||||
COMMAND_MOVE_TO = 4
|
||||
};
|
||||
|
||||
#define UNIT_ACTION_BUTTON_ACTION(X) (uint32(X) & 0x00FFFFFF)
|
||||
#define UNIT_ACTION_BUTTON_TYPE(X) ((uint32(X) & 0xFF000000) >> 24)
|
||||
#define MAKE_UNIT_ACTION_BUTTON(A, T) (uint32(A) | (uint32(T) << 24))
|
||||
@@ -999,8 +974,6 @@ enum PlayerTotemType
|
||||
SUMMON_TYPE_TOTEM_AIR = 83
|
||||
};
|
||||
|
||||
#define MAX_EQUIPMENT_ITEMS 3
|
||||
|
||||
// delay time next attack to prevent client attack animation problems
|
||||
#define ATTACK_DISPLAY_DELAY 200
|
||||
#define MAX_PLAYER_STEALTH_DETECT_RANGE 30.0f // max distance for detection targets by player
|
||||
@@ -1874,7 +1847,7 @@ class TC_GAME_API Unit : public WorldObject
|
||||
void SendPetAIReaction(ObjectGuid guid);
|
||||
///----------End of Pet responses methods----------
|
||||
|
||||
void propagateSpeedChange() { GetMotionMaster()->propagateSpeedChange(); }
|
||||
void propagateSpeedChange();
|
||||
|
||||
// reactive attacks
|
||||
void ClearAllReactives();
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#define BASE_MAXDAMAGE 2.0f
|
||||
#define BASE_ATTACK_TIME 2000
|
||||
|
||||
#define MAX_EQUIPMENT_ITEMS 3
|
||||
|
||||
// byte value (UNIT_FIELD_BYTES_1, 0)
|
||||
enum UnitStandStateType : uint8
|
||||
{
|
||||
@@ -357,4 +359,31 @@ struct DeclinedName
|
||||
std::string name[MAX_DECLINED_NAME_CASES];
|
||||
};
|
||||
|
||||
enum ActiveStates
|
||||
{
|
||||
ACT_PASSIVE = 0x01, // 0x01 - passive
|
||||
ACT_DISABLED = 0x81, // 0x80 - castable
|
||||
ACT_ENABLED = 0xC1, // 0x40 | 0x80 - auto cast + castable
|
||||
ACT_COMMAND = 0x07, // 0x01 | 0x02 | 0x04
|
||||
ACT_REACTION = 0x06, // 0x02 | 0x04
|
||||
ACT_DECIDE = 0x00 // custom
|
||||
};
|
||||
|
||||
enum ReactStates
|
||||
{
|
||||
REACT_PASSIVE = 0,
|
||||
REACT_DEFENSIVE = 1,
|
||||
REACT_AGGRESSIVE = 2,
|
||||
REACT_ASSIST = 3
|
||||
};
|
||||
|
||||
enum CommandStates : uint8
|
||||
{
|
||||
COMMAND_STAY = 0,
|
||||
COMMAND_FOLLOW = 1,
|
||||
COMMAND_ATTACK = 2,
|
||||
COMMAND_ABANDON = 3,
|
||||
COMMAND_MOVE_TO = 4
|
||||
};
|
||||
|
||||
#endif // UnitDefines_h__
|
||||
|
||||
@@ -16,19 +16,21 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Common.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Vehicle.h"
|
||||
#include "Battleground.h"
|
||||
#include "Common.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "EventProcessor.h"
|
||||
#include "Log.h"
|
||||
#include "MoveSplineInit.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "Unit.h"
|
||||
#include "Util.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "MoveSplineInit.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "EventProcessor.h"
|
||||
#include "Player.h"
|
||||
#include "Battleground.h"
|
||||
|
||||
Vehicle::Vehicle(Unit* unit, VehicleEntry const* vehInfo, uint32 creatureEntry) :
|
||||
UsableSeatNum(0), _me(unit), _vehicleInfo(vehInfo), _creatureEntry(creatureEntry), _status(STATUS_NONE), _lastShootPos()
|
||||
|
||||
@@ -17,18 +17,21 @@
|
||||
*/
|
||||
|
||||
#include "GameEventMgr.h"
|
||||
#include "World.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "PoolMgr.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "Creature.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GameObject.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "MapManager.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "PoolMgr.h"
|
||||
#include "World.h"
|
||||
#include "WorldStatePackets.h"
|
||||
#include "DatabaseEnv.h"
|
||||
|
||||
GameEventMgr* GameEventMgr::instance()
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "AreaTriggerDataStore.h"
|
||||
#include "AreaTriggerTemplate.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Timer.h"
|
||||
@@ -31,9 +32,9 @@ namespace
|
||||
void AreaTriggerDataStore::LoadAreaTriggerTemplates()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
std::unordered_map<uint32, std::vector<G3D::Vector2>> verticesByAreaTrigger;
|
||||
std::unordered_map<uint32, std::vector<G3D::Vector2>> verticesTargetByAreaTrigger;
|
||||
std::unordered_map<uint32, std::vector<G3D::Vector3>> splinesBySpellMisc;
|
||||
std::unordered_map<uint32, std::vector<TaggedPosition<Position::XY>>> verticesByAreaTrigger;
|
||||
std::unordered_map<uint32, std::vector<TaggedPosition<Position::XY>>> verticesTargetByAreaTrigger;
|
||||
std::unordered_map<uint32, std::vector<Position>> splinesBySpellMisc;
|
||||
std::unordered_map<uint32, std::vector<AreaTriggerAction>> actionsByAreaTrigger;
|
||||
|
||||
// 0 1 2 3
|
||||
@@ -102,13 +103,7 @@ void AreaTriggerDataStore::LoadAreaTriggerTemplates()
|
||||
{
|
||||
Field* splineFields = splines->Fetch();
|
||||
uint32 spellMiscId = splineFields[0].GetUInt32();
|
||||
|
||||
G3D::Vector3 spline;
|
||||
spline.x = splineFields[1].GetFloat();
|
||||
spline.y = splineFields[2].GetFloat();
|
||||
spline.z = splineFields[3].GetFloat();
|
||||
|
||||
splinesBySpellMisc[spellMiscId].push_back(spline);
|
||||
splinesBySpellMisc[spellMiscId].emplace_back(splineFields[1].GetFloat(), splineFields[2].GetFloat(), splineFields[3].GetFloat());
|
||||
}
|
||||
while (splines->NextRow());
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "DisableMgr.h"
|
||||
#include "GameObject.h"
|
||||
#include "GameTables.h"
|
||||
#include "GridDefines.h"
|
||||
#include "GossipDef.h"
|
||||
@@ -33,7 +34,7 @@
|
||||
#include "LootMgr.h"
|
||||
#include "Mail.h"
|
||||
#include "MapManager.h"
|
||||
#include "Object.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectDefines.h"
|
||||
#include "Player.h"
|
||||
@@ -50,6 +51,7 @@
|
||||
#include "Vehicle.h"
|
||||
#include "VMapFactory.h"
|
||||
#include "World.h"
|
||||
#include <G3D/g3dmath.h>
|
||||
|
||||
ScriptMapMap sSpellScripts;
|
||||
ScriptMapMap sEventScripts;
|
||||
|
||||
@@ -19,42 +19,33 @@
|
||||
#ifndef _OBJECTMGR_H
|
||||
#define _OBJECTMGR_H
|
||||
|
||||
#include "Object.h"
|
||||
#include "Bag.h"
|
||||
#include "Creature.h"
|
||||
#include "DynamicObject.h"
|
||||
#include "Conversation.h"
|
||||
#include "GameObject.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "Corpse.h"
|
||||
#include "QuestDef.h"
|
||||
#include "Common.h"
|
||||
#include "ConditionMgr.h"
|
||||
#include "CreatureData.h"
|
||||
#include "DatabaseEnvFwd.h"
|
||||
#include "GameObjectData.h"
|
||||
#include "ItemTemplate.h"
|
||||
#include "NPCHandler.h"
|
||||
#include "DatabaseEnvFwd.h"
|
||||
#include "Mail.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectDefines.h"
|
||||
#include "ConditionMgr.h"
|
||||
#include "ItemTemplate.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "Position.h"
|
||||
#include "QuestDef.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "VehicleDefines.h"
|
||||
#include "ConditionMgr.h"
|
||||
#include "DB2Stores.h"
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <map>
|
||||
#include <limits>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
||||
class Item;
|
||||
class Unit;
|
||||
class Vehicle;
|
||||
struct AccessRequirement;
|
||||
struct DeclinedName;
|
||||
struct DungeonEncounterEntry;
|
||||
struct FactionEntry;
|
||||
struct PlayerInfo;
|
||||
struct PlayerLevelInfo;
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct SkillRaceClassInfoEntry;
|
||||
struct WorldSafeLocsEntry;
|
||||
|
||||
struct PageText
|
||||
{
|
||||
@@ -64,6 +55,15 @@ struct PageText
|
||||
uint8 Flags;
|
||||
};
|
||||
|
||||
enum SummonerType
|
||||
{
|
||||
SUMMONER_TYPE_CREATURE = 0,
|
||||
SUMMONER_TYPE_GAMEOBJECT = 1,
|
||||
SUMMONER_TYPE_MAP = 2
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
/// Key for storing temp summon data in TempSummonDataContainer
|
||||
struct TempSummonGroupKey
|
||||
{
|
||||
@@ -84,6 +84,15 @@ private:
|
||||
uint8 _summonGroup; ///< Summon's group id
|
||||
};
|
||||
|
||||
/// Stores data for temp summons
|
||||
struct TempSummonData
|
||||
{
|
||||
uint32 entry; ///< Entry of summoned creature
|
||||
Position pos; ///< Position, where should be creature spawned
|
||||
TempSummonType type; ///< Summon type, see TempSummonType for available types
|
||||
uint32 time; ///< Despawn time, usable only with certain temp summon types
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
// DB scripting commands
|
||||
@@ -137,7 +146,13 @@ enum ChatType
|
||||
|
||||
typedef std::map<uint32, PageText> PageTextContainer;
|
||||
|
||||
// Benchmarked: Faster than std::map (insert/find)
|
||||
struct InstanceTemplate
|
||||
{
|
||||
uint32 Parent;
|
||||
uint32 ScriptId;
|
||||
bool AllowMount;
|
||||
};
|
||||
|
||||
typedef std::unordered_map<uint16, InstanceTemplate> InstanceTemplateContainer;
|
||||
|
||||
struct GameTele
|
||||
@@ -461,11 +476,24 @@ struct TrinityString
|
||||
};
|
||||
|
||||
typedef std::map<ObjectGuid, ObjectGuid> LinkedRespawnContainer;
|
||||
typedef std::unordered_map<uint32, CreatureTemplate> CreatureTemplateContainer;
|
||||
typedef std::unordered_map<uint32, CreatureAddon> CreatureTemplateAddonContainer;
|
||||
typedef std::unordered_map<ObjectGuid::LowType, CreatureData> CreatureDataContainer;
|
||||
typedef std::unordered_map<ObjectGuid::LowType, CreatureAddon> CreatureAddonContainer;
|
||||
typedef std::unordered_map<uint16, CreatureBaseStats> CreatureBaseStatsContainer;
|
||||
typedef std::unordered_map<uint8, EquipmentInfo> EquipmentInfoContainerInternal;
|
||||
typedef std::unordered_map<uint32, EquipmentInfoContainerInternal> EquipmentInfoContainer;
|
||||
typedef std::unordered_map<uint32, CreatureModelInfo> CreatureModelContainer;
|
||||
typedef std::unordered_map<uint32, std::vector<uint32>> CreatureQuestItemMap;
|
||||
typedef std::unordered_map<uint32, GameObjectTemplate> GameObjectTemplateContainer;
|
||||
typedef std::unordered_map<uint32, GameObjectTemplateAddon> GameObjectTemplateAddonContainer;
|
||||
typedef std::unordered_map<ObjectGuid::LowType, GameObjectData> GameObjectDataContainer;
|
||||
typedef std::map<TempSummonGroupKey, std::vector<TempSummonData> > TempSummonDataContainer;
|
||||
typedef std::unordered_map<ObjectGuid::LowType, GameObjectAddon> GameObjectAddonContainer;
|
||||
typedef std::unordered_map<uint32, std::vector<uint32>> GameObjectQuestItemMap;
|
||||
typedef std::map<TempSummonGroupKey, std::vector<TempSummonData>> TempSummonDataContainer;
|
||||
typedef std::unordered_map<uint32, CreatureLocale> CreatureLocaleContainer;
|
||||
typedef std::unordered_map<uint32, GameObjectLocale> GameObjectLocaleContainer;
|
||||
typedef std::unordered_map<uint32, ItemTemplate> ItemTemplateContainer;
|
||||
typedef std::unordered_map<uint32, QuestTemplateLocale> QuestTemplateLocaleContainer;
|
||||
typedef std::unordered_map<uint32, QuestObjectivesLocale> QuestObjectivesLocaleContainer;
|
||||
typedef std::unordered_map<uint32, QuestOfferRewardLocale> QuestOfferRewardLocaleContainer;
|
||||
@@ -552,7 +580,11 @@ struct PlayerInfo
|
||||
|
||||
struct PetLevelInfo
|
||||
{
|
||||
PetLevelInfo() : health(0), mana(0), armor(0) { memset(stats, 0, sizeof(stats)); }
|
||||
PetLevelInfo() : health(0), mana(0), armor(0)
|
||||
{
|
||||
for (uint16& stat : stats)
|
||||
stat = 0;
|
||||
}
|
||||
|
||||
uint16 stats[MAX_STATS];
|
||||
uint16 health;
|
||||
@@ -865,7 +897,7 @@ class TC_GAME_API ObjectMgr
|
||||
|
||||
static ObjectGuid GetPlayerGUIDByName(std::string const& name);
|
||||
|
||||
GameObjectQuestItemList const* GetGameObjectQuestItemList(uint32 id) const
|
||||
std::vector<uint32> const* GetGameObjectQuestItemList(uint32 id) const
|
||||
{
|
||||
GameObjectQuestItemMap::const_iterator itr = _gameObjectQuestItemStore.find(id);
|
||||
if (itr != _gameObjectQuestItemStore.end())
|
||||
@@ -874,7 +906,7 @@ class TC_GAME_API ObjectMgr
|
||||
}
|
||||
GameObjectQuestItemMap const* GetGameObjectQuestItemMap() const { return &_gameObjectQuestItemStore; }
|
||||
|
||||
CreatureQuestItemList const* GetCreatureQuestItemList(uint32 id) const
|
||||
std::vector<uint32> const* GetCreatureQuestItemList(uint32 id) const
|
||||
{
|
||||
CreatureQuestItemMap::const_iterator itr = _creatureQuestItemStore.find(id);
|
||||
if (itr != _creatureQuestItemStore.end())
|
||||
|
||||
@@ -19,9 +19,12 @@
|
||||
#include "GridStates.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectGridLoader.h"
|
||||
|
||||
void InvalidState::Update(Map&, NGridType&, GridInfo&, uint32) const
|
||||
{ }
|
||||
{
|
||||
}
|
||||
|
||||
void ActiveState::Update(Map& map, NGridType& grid, GridInfo& info, uint32 diff) const
|
||||
{
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
#ifndef TRINITY_GRIDNOTIFIERS_H
|
||||
#define TRINITY_GRIDNOTIFIERS_H
|
||||
|
||||
#include "ObjectGridLoader.h"
|
||||
#include "UpdateData.h"
|
||||
|
||||
#include "AreaTrigger.h"
|
||||
#include "Creature.h"
|
||||
#include "Corpse.h"
|
||||
@@ -32,6 +29,7 @@
|
||||
#include "Player.h"
|
||||
#include "Spell.h"
|
||||
#include "UnitAI.h"
|
||||
#include "UpdateData.h"
|
||||
|
||||
namespace Trinity
|
||||
{
|
||||
@@ -888,9 +886,6 @@ namespace Trinity
|
||||
|
||||
bool operator()(Unit* u) const
|
||||
{
|
||||
if (G3D::fuzzyEq(_range, 0))
|
||||
return false;
|
||||
|
||||
if (_raid)
|
||||
{
|
||||
if (!_refUnit->IsInRaidWith(u))
|
||||
@@ -962,7 +957,7 @@ namespace Trinity
|
||||
: i_obj(obj), i_funit(funit), _spellInfo(NULL), i_range(range)
|
||||
{
|
||||
if (DynamicObject const* dynObj = i_obj->ToDynObject())
|
||||
_spellInfo = sSpellMgr->GetSpellInfo(dynObj->GetSpellId());
|
||||
_spellInfo = dynObj->GetSpellInfo();
|
||||
}
|
||||
|
||||
bool operator()(Unit* u) const
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
#define TRINITY_GRIDNOTIFIERSIMPL_H
|
||||
|
||||
#include "GridNotifiers.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "Corpse.h"
|
||||
#include "Player.h"
|
||||
#include "UpdateData.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "Player.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "Opcodes.h"
|
||||
#include "UpdateData.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
template<class T>
|
||||
inline void Trinity::VisibleNotifier::Visit(GridRefManager<T> &m)
|
||||
|
||||
@@ -21,7 +21,9 @@
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "Common.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Formulas.h"
|
||||
#include "GameObject.h"
|
||||
#include "GroupMgr.h"
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "LFGMgr.h"
|
||||
@@ -31,7 +33,6 @@
|
||||
#include "MapManager.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "PartyPackets.h"
|
||||
#include "Pet.h"
|
||||
#include "Player.h"
|
||||
@@ -41,7 +42,6 @@
|
||||
#include "UpdateFieldFlags.h"
|
||||
#include "Util.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
Roll::Roll(LootItem const& li) : itemid(li.itemid),
|
||||
@@ -458,23 +458,20 @@ bool Group::AddMember(Player* player)
|
||||
player->ResetInstances(INSTANCE_RESET_GROUP_JOIN, true, false);
|
||||
player->ResetInstances(INSTANCE_RESET_GROUP_JOIN, true, true);
|
||||
|
||||
if (player->getLevel() >= LEVELREQUIREMENT_HEROIC)
|
||||
if (player->GetDungeonDifficultyID() != GetDungeonDifficultyID())
|
||||
{
|
||||
if (player->GetDungeonDifficultyID() != GetDungeonDifficultyID())
|
||||
{
|
||||
player->SetDungeonDifficultyID(GetDungeonDifficultyID());
|
||||
player->SendDungeonDifficulty();
|
||||
}
|
||||
if (player->GetRaidDifficultyID() != GetRaidDifficultyID())
|
||||
{
|
||||
player->SetRaidDifficultyID(GetRaidDifficultyID());
|
||||
player->SendRaidDifficulty(false);
|
||||
}
|
||||
if (player->GetLegacyRaidDifficultyID() != GetLegacyRaidDifficultyID())
|
||||
{
|
||||
player->SetLegacyRaidDifficultyID(GetLegacyRaidDifficultyID());
|
||||
player->SendRaidDifficulty(true);
|
||||
}
|
||||
player->SetDungeonDifficultyID(GetDungeonDifficultyID());
|
||||
player->SendDungeonDifficulty();
|
||||
}
|
||||
if (player->GetRaidDifficultyID() != GetRaidDifficultyID())
|
||||
{
|
||||
player->SetRaidDifficultyID(GetRaidDifficultyID());
|
||||
player->SendRaidDifficulty(false);
|
||||
}
|
||||
if (player->GetLegacyRaidDifficultyID() != GetLegacyRaidDifficultyID())
|
||||
{
|
||||
player->SetLegacyRaidDifficultyID(GetLegacyRaidDifficultyID());
|
||||
player->SendRaidDifficulty(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
#define TRINITYCORE_GROUP_H
|
||||
|
||||
#include "DBCEnums.h"
|
||||
#include "DatabaseEnvFwd.h"
|
||||
#include "GroupRefManager.h"
|
||||
#include "Loot.h"
|
||||
#include "QueryResult.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "Object.h"
|
||||
#include "SharedDefines.h"
|
||||
#include <map>
|
||||
|
||||
class Battlefield;
|
||||
|
||||
@@ -25,13 +25,15 @@
|
||||
#include "ChatPackets.h"
|
||||
#include "Config.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GuildFinderMgr.h"
|
||||
#include "GuildMgr.h"
|
||||
#include "GuildPackets.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SocialMgr.h"
|
||||
|
||||
@@ -17,11 +17,12 @@
|
||||
|
||||
#include "GuildFinderMgr.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Guild.h"
|
||||
#include "GuildMgr.h"
|
||||
#include "GuildFinderPackets.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
#include "World.h"
|
||||
|
||||
|
||||
@@ -16,11 +16,13 @@
|
||||
*/
|
||||
|
||||
#include "GuildMgr.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Guild.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "World.h"
|
||||
#include <algorithm>
|
||||
|
||||
GuildMgr::GuildMgr() : NextGuildId(UI64LIT(1))
|
||||
{
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
#include "WorldSession.h"
|
||||
#include "ArtifactPackets.h"
|
||||
#include "ConditionMgr.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GameTables.h"
|
||||
#include "Item.h"
|
||||
#include "Player.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
@@ -20,9 +20,13 @@
|
||||
#include "AccountMgr.h"
|
||||
#include "AuctionHouseMgr.h"
|
||||
#include "AuctionHousePackets.h"
|
||||
#include "Creature.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Item.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "Mail.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "Util.h"
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
*/
|
||||
|
||||
#include "BankPackets.h"
|
||||
#include "Item.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Log.h"
|
||||
#include "NPCPackets.h"
|
||||
#include "Opcodes.h"
|
||||
|
||||
@@ -16,38 +16,36 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Common.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "ArenaTeamMgr.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
#include "ArenaTeam.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "Battleground.h"
|
||||
#include "BattlegroundPackets.h"
|
||||
#include "Chat.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "Player.h"
|
||||
#include "Object.h"
|
||||
#include "Opcodes.h"
|
||||
#include "DisableMgr.h"
|
||||
#include "Group.h"
|
||||
#include "ArenaTeamMgr.h"
|
||||
#include "Battlefield.h"
|
||||
#include "BattlefieldMgr.h"
|
||||
#include "Battleground.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "BattlegroundPackets.h"
|
||||
#include "Chat.h"
|
||||
#include "Common.h"
|
||||
#include "Creature.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "DisableMgr.h"
|
||||
#include "Group.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "NPCPackets.h"
|
||||
#include "Object.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Player.h"
|
||||
|
||||
void WorldSession::HandleBattlemasterHelloOpcode(WorldPackets::NPC::Hello& hello)
|
||||
{
|
||||
Creature* unit = GetPlayer()->GetMap()->GetCreature(hello.Unit);
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(hello.Unit, UNIT_NPC_FLAG_BATTLEMASTER);
|
||||
if (!unit)
|
||||
return;
|
||||
|
||||
if (!unit->IsBattleMaster()) // it's not battlemaster
|
||||
return;
|
||||
|
||||
// Stop the npc if moving
|
||||
unit->StopMoving();
|
||||
|
||||
@@ -643,7 +641,7 @@ void WorldSession::HandleRequestPvpReward(WorldPackets::Battleground::RequestPVP
|
||||
|
||||
void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPackets::Battleground::AreaSpiritHealerQuery& areaSpiritHealerQuery)
|
||||
{
|
||||
Creature* unit = GetPlayer()->GetMap()->GetCreature(areaSpiritHealerQuery.HealerGuid);
|
||||
Creature* unit = ObjectAccessor::GetCreature(*GetPlayer(), areaSpiritHealerQuery.HealerGuid);
|
||||
if (!unit)
|
||||
return;
|
||||
|
||||
@@ -659,7 +657,7 @@ void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPackets::Battleground:
|
||||
|
||||
void WorldSession::HandleAreaSpiritHealerQueueOpcode(WorldPackets::Battleground::AreaSpiritHealerQueue& areaSpiritHealerQueue)
|
||||
{
|
||||
Creature* unit = GetPlayer()->GetMap()->GetCreature(areaSpiritHealerQueue.HealerGuid);
|
||||
Creature* unit = ObjectAccessor::GetCreature(*GetPlayer(), areaSpiritHealerQueue.HealerGuid);
|
||||
if (!unit)
|
||||
return;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "BlackMarketMgr.h"
|
||||
#include "BlackMarketPackets.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Item.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "Channel.h"
|
||||
#include "ChannelMgr.h"
|
||||
#include "ChannelPackets.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectMgr.h" // for normalizePlayerName
|
||||
#include "Player.h"
|
||||
|
||||
@@ -30,19 +30,23 @@
|
||||
#include "ClientConfigPackets.h"
|
||||
#include "Common.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "EquipmentSetPackets.h"
|
||||
#include "GameObject.h"
|
||||
#include "GitRevision.h"
|
||||
#include "Group.h"
|
||||
#include "Guild.h"
|
||||
#include "GuildFinderMgr.h"
|
||||
#include "GuildMgr.h"
|
||||
#include "Item.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "Metric.h"
|
||||
#include "MiscPackets.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Pet.h"
|
||||
#include "Player.h"
|
||||
#include "PlayerDump.h"
|
||||
@@ -56,7 +60,6 @@
|
||||
#include "SystemPackets.h"
|
||||
#include "Util.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
|
||||
class LoginQueryHolder : public SQLQueryHolder
|
||||
{
|
||||
|
||||
@@ -16,29 +16,30 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Common.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "GuildMgr.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Chat.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "Channel.h"
|
||||
#include "ChannelMgr.h"
|
||||
#include "Chat.h"
|
||||
#include "ChatPackets.h"
|
||||
#include "Common.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Group.h"
|
||||
#include "Guild.h"
|
||||
#include "GuildMgr.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "Util.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "ChatPackets.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
|
||||
void WorldSession::HandleChatMessageOpcode(WorldPackets::Chat::ChatMessage& chatMessage)
|
||||
{
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Common.h"
|
||||
#include "Log.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "Vehicle.h"
|
||||
#include "Player.h"
|
||||
#include "CombatPackets.h"
|
||||
#include "Common.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "DB2Structure.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
#include "Vehicle.h"
|
||||
|
||||
void WorldSession::HandleAttackSwingOpcode(WorldPackets::Combat::AttackSwing& packet)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "Log.h"
|
||||
#include "LootPackets.h"
|
||||
#include "MiscPackets.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "PartyPackets.h"
|
||||
#include "Player.h"
|
||||
#include "SocialMgr.h"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user