48 TrainerSpellMap::const_iterator itr =
spellList.find(spell_id);
58 for (VendorItemList::iterator i =
m_items.begin(); i !=
m_items.end();)
60 if ((*i)->item == item_id && (*i)->Type == type)
73 for (VendorItemList::const_iterator i =
m_items.begin(); i !=
m_items.end(); ++i)
74 if ((*i)->item == item_id && (*i)->ExtendedCost == extendedCost && (*i)->Type == type)
89 return ((c > 0) ? modelIDs[std::rand() % c] : 0);
132 return sObjectMgr->GetCreatureBaseStats(level, unitClass);
225 CreatureGroupInfoType::iterator frmdata =
sFormationMgr->CreatureGroupMap.find(lowguid);
227 sFormationMgr->AddCreatureToGroup(frmdata->second->leaderGUID,
this);
262 SF_LOG_ERROR(
"sql.sql",
"Creature::InitEntry creature entry %u does not exist.", entry);
268 while (!cinfo && difficultyEntry)
290 if (
GetMap()->Is25ManRaid())
291 loot.maxDuplicates = 3;
305 SF_LOG_ERROR(
"sql.sql",
"Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ", entry);
313 SF_LOG_ERROR(
"sql.sql",
"Creature (Entry: %u) has no model defined in table `creature_template`, can't load. ", entry);
375 uint32 npcflag, unit_flags, dynamicflags;
426 owner->VehicleSpellInitialize();
470 time_t now = time(NULL);
479 if (!linkedRespawntime)
484 if (targetGuid == dbtableHighGuid)
487 m_respawnTime = (now > linkedRespawntime ? now : linkedRespawntime) + (std::rand() %
MINUTE + 5);
536 i_AI->AttackStart(charmer);
545 i_AI->UpdateAI(diff);
603 if (curValue >= maxValue)
614 addvalue =
uint32((Spirit / 5.0f + 17.0f) * ManaIncreaseRate);
617 addvalue = maxValue / 3;
621 for (AuraEffectList::const_iterator i = ModPowerRegenPCTAuras.begin(); i != ModPowerRegenPCTAuras.end(); ++i)
623 AddPct(addvalue, (*i)->GetAmount());
638 if (curValue >= maxValue)
650 addvalue =
uint32(Spirit * 0.25 * HealthIncreaseRate);
652 addvalue =
uint32(Spirit * 0.80 * HealthIncreaseRate);
655 addvalue = maxValue / 3;
659 for (AuraEffectList::const_iterator i = ModPowerRegenPCTAuras.begin(); i != ModPowerRegenPCTAuras.end(); ++i)
660 AddPct(addvalue, (*i)->GetAmount());
688 cell.
Visit(p, grid_creature_searcher, *
GetMap(), *
this, radius);
707 SF_LOG_DEBUG(
"scripts",
"AIM_Initialize: failed to init, locked.");
718 i_AI->InitializeAI();
755 SF_LOG_ERROR(
"sql.sql",
"Creature::Create(): creature template (guidlow: %u, entry: %u) does not exist.", guidlow,
Entry);
769 SF_LOG_ERROR(
"entities.unit",
"Creature::Create(): given coordinates for creature (guidlow %d, entry %d) are not valid (X: %f, Y: %f, Z: %f, O: %f)", guidlow,
Entry, x, y, z, ang);
941 SF_LOG_ERROR(
"entities.unit",
"Creature::SaveToDB failed, cannot get creature data!");
1018 trans->Append(stmt);
1042 trans->Append(stmt);
1054 uint8 level = minlevel == maxlevel ? minlevel :
uint8(std::rand() % (maxlevel - minlevel + 1) + minlevel);
1182 SF_LOG_ERROR(
"sql.sql",
"Creature::CreateFromProto(): creature template (guidlow: %u, entry: %u) does not exist.", guidlow,
Entry);
1208 SF_LOG_ERROR(
"sql.sql",
"Creature (GUID: %u) not found in table `creature`, can't load. ", guid);
1240 if (data->
posZ - tz > 0.1f)
1277 if (addToMap && !
GetMap()->AddToMap(
this))
1300 for (
uint8 i = 0; i < 3; ++i)
1307 for (QuestRelations::const_iterator itr = qr.first; itr != qr.second; ++itr)
1309 if (itr->second == quest_id)
1318 for (QuestRelations::const_iterator itr = qir.first; itr != qir.second; ++itr)
1320 if (itr->second == quest_id)
1341 trans->Append(stmt);
1345 trans->Append(stmt);
1349 trans->Append(stmt);
1353 trans->Append(stmt);
1431 float RetDistance = 20;
1435 RetDistance -= (float)leveldif;
1447 if (RetDistance < 5)
1450 return (RetDistance * aggroRate);
1532 SF_LOG_DEBUG(
"entities.unit",
"Respawning creature %s (GuidLow: %u, Full GUID: " UI64FMTD " Entry: %u)",
1577 if (timeMSToDespawn)
1594 summon->UnSummon(msTimeToDespawn);
1610 bool immunedToAllEffects =
true;
1617 immunedToAllEffects =
false;
1621 if (immunedToAllEffects)
1671 bool bcontinue =
true;
1693 if (dist > range || dist < minrange)
1720 bool bcontinue =
true;
1740 if (dist > range || dist < minrange)
1758 Unit* target = NULL;
1770 cell.
Visit(p, world_unit_searcher, *
GetMap(), *
this, dist);
1771 cell.
Visit(p, grid_unit_searcher, *
GetMap(), *
this, dist);
1784 Unit* target = NULL;
1788 SF_LOG_ERROR(
"entities.unit",
"Creature (GUID: %u Entry: %u) SelectNearestTargetInAttackDistance called with dist > MAX_VISIBILITY_DISTANCE. Distance set to ATTACK_DISTANCE.",
GetGUIDLow(),
GetEntry());
1826 data <<
uint32(reactionType);
1829 ((
WorldObject*)
this)->SendMessageToSet(&data,
true);
1831 SF_LOG_DEBUG(
"network",
"WORLD: Sent SMSG_AI_REACTION, type %u.", reactionType);
1844 std::list<Creature*> assistList;
1856 cell.
Visit(p, grid_creature_searcher, *
GetMap(), *
this, radius);
1859 if (!assistList.empty())
1862 while (!assistList.empty())
1866 assistList.pop_front();
1888 cell.
Visit(p, grid_creature_searcher, *
GetMap(), *
this, radius);
1960 if (myVictim == target || targetVictim ==
this ||
IsHostileTo(target))
2025 if (cainfo->
mount != 0)
2065 if (cainfo->
emote != 0)
2072 if (!cainfo->
auras.empty())
2074 for (std::vector<uint32>::const_iterator itr = cainfo->
auras.begin(); itr != cainfo->
auras.end(); ++itr)
2077 if (!AdditionalSpellInfo)
2114 SF_LOG_ERROR(
"entities.unit",
"Creature entry %u call SetInCombatWithZone but creature cannot have threat list.",
GetEntry());
2122 SF_LOG_ERROR(
"entities.unit",
"Creature entry %u call SetInCombatWithZone for map (id: %u) that isn't an instance.",
GetEntry(), map->
GetId());
2133 if (
Player* player = i->GetSource())
2135 if (player->IsGameMaster())
2138 if (player->IsAlive())
2141 player->SetInCombatWith(
this);
2188 time_t t = time(NULL);
2200 time_t curTime = time(NULL);
2225 ai->SpellInterrupted(unSpellId, unTimeMs);
2241 time_t now = time(NULL);
2258 *ori = data->orientation;
2260 *dist = data->spawndist;
2279 time_t now = time(NULL);
2309 return uint8(level);
2339 if (itr->itemId == vItem->
item)
2347 time_t ptime = time(NULL);
2353 if ((vCount->
count + diff * pProto->BuyCount) >= vItem->
maxcount)
2359 vCount->
count += diff * pProto->BuyCount;
2363 return vCount->
count;
2373 if (itr->itemId == vItem->
item)
2385 time_t ptime = time(NULL);
2391 if ((vCount->
count + diff * pProto->BuyCount) < vItem->
maxcount)
2392 vCount->
count += diff * pProto->BuyCount;
2397 vCount->
count = vCount->
count > used_count ? vCount->
count - used_count : 0;
2399 return vCount->
count;
2416 if (cl->
Name.size() > uloc_idx && !cl->
Name[uloc_idx].empty())
2417 return cl->
Name[uloc_idx];
2439 return m_charmInfo->GetCharmSpell(pos)->GetAction();
2447 SF_LOG_DEBUG(
"entities.unit",
"Creature::SetPosition(%f, %f, %f) .. bad coordinates!", x, y, z);
2467 if (target && this->
IsPet())
2480 if (levelDiff < -25)
2484 float aggroRadius = 20;
2487 aggroRadius -= (float)levelDiff;
2501 if (aggroRadius < 10)
2504 return (aggroRadius);
2516 Unit* target = NULL;
uint8 BattlePetNormalizeWildLevel(uint8 level)
#define sBattlePetSpawnMgr
@ CREATURE_FLAG_EXTRA_DUNGEON_BOSS
@ CREATURE_FLAG_EXTRA_NO_TAUNT
@ CREATURE_FLAG_EXTRA_WORLDEVENT
#define CREATURE_REGEN_INTERVAL
#define CREATURE_Z_ATTACK_RANGE
#define MAX_EQUIPMENT_ITEMS
@ FACTION_TEMPLATE_FLAG_PVP
std::set< uint32 > const & GetPhasesForGroup(uint32 group)
DBCStorage< DifficultyEntry > sDifficultyStore(Difficultyfmt)
DBCStorage< FactionTemplateEntry > sFactionTemplateStore(FactionTemplateEntryfmt)
DBCStorage< MapEntry > sMapStore(MapEntryfmt)
#define MAX_SPELL_EFFECTS
TypeMapContainer< AllWorldObjectTypes > WorldTypeMapContainer
TypeMapContainer< AllGridObjectTypes > GridTypeMapContainer
CoordPair< TOTAL_NUMBER_OF_CELLS_PER_MAP > CellCoord
#define SF_LOG_DEBUG(filterType__,...)
#define SF_LOG_ERROR(filterType__,...)
LootStore LootTemplates_Skinning("skinning_loot_template", "creature skinning id", true)
#define MAX_VISIBILITY_DISTANCE
uint64 MAKE_NEW_GUID(uint32 l, uint32 e, uint32 h)
std::pair< QuestRelations::const_iterator, QuestRelations::const_iterator > QuestRelationBounds
@ SERVERSIDE_VISIBILITY_GHOST
@ SPELL_EFFECT_HEALTH_LEECH
@ SPELL_EFFECT_ENVIRONMENTAL_DAMAGE
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ SPELL_PREVENTION_TYPE_SILENCE
@ SPELL_PREVENTION_TYPE_PACIFY
@ CREATURE_TYPE_NON_COMBAT_PET
@ CREATURE_TYPE_MECHANICAL
@ CREATURE_ELITE_WORLDBOSS
@ CREATURE_ELITE_RAREELITE
@ SPELL_ATTR5_DONT_TURN_DURING_CAST
#define CURRENT_CONTENT_EXP
@ CREATURE_TYPEFLAGS_BOSS
@ SPELL_SCHOOL_MASK_NORMAL
@ SPELL_AURA_MOD_POWER_REGEN
@ SPELL_AURA_PREVENTS_FLEEING
@ SPELL_AURA_MOD_HEALTH_REGEN_PERCENT
@ SPELL_AURA_MOD_DETECTED_RANGE
@ SPELL_AURA_MOD_POWER_REGEN_PERCENT
@ SPELL_AURA_MOD_DETECT_RANGE
Skyfire::AutoPtr< Transaction, Skyfire::Mutex > SQLTransaction
@ UNIT_NPC_FLAG_WILDPET_CAPTURABLE
@ UNIT_MOD_RESISTANCE_SHADOW
@ UNIT_MOD_RESISTANCE_FROST
@ UNIT_MOD_RESISTANCE_HOLY
@ UNIT_MOD_RESISTANCE_ARCANE
@ UNIT_MOD_RESISTANCE_FIRE
@ UNIT_MOD_RESISTANCE_NATURE
#define CREATURE_MAX_SPELLS
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_IMMUNE_TO_NPC
@ UNIT_FLAG_DISABLE_POWERS
@ UNIT_FLAG_NOT_SELECTABLE
@ UNIT_FIELD_MOD_CASTING_SPEED
@ UNIT_FIELD_VIRTUAL_ITEM_ID
@ UNIT_FIELD_SHAPESHIFT_FORM
@ UNIT_FIELD_MOD_SPELL_HASTE
@ UNIT_FIELD_MAX_RANGED_DAMAGE
@ UNIT_FIELD_WILD_BATTLE_PET_LEVEL
@ UNIT_FIELD_BOUNDING_RADIUS
@ UNIT_FIELD_COMBAT_REACH
@ UNIT_FIELD_MIN_RANGED_DAMAGE
@ UNIT_FIELD_HOVER_HEIGHT
@ UNIT_FIELD_NPC_EMOTESTATE
@ OBJECT_FIELD_DYNAMIC_FLAGS
@ WORLD_DEL_GAME_EVENT_MODEL_EQUIP
@ WORLD_DEL_CREATURE_ADDON
@ WORLD_DEL_GAME_EVENT_CREATURE
void AddAssistant(uint64 guid)
std::list< uint64 > m_assistants
bool Execute(uint64 e_time, uint32 p_time) OVERRIDE
void WriteGuidBytes(const ObjectGuid &guid, Offsets... offsets)
void WriteGuidMask(const ObjectGuid &guid, Offsets... offsets)
virtual bool CanRespawn()
virtual void JustRespawned()
virtual void CorpseRemoved(uint32 &)
== State checks =================================
float GetSpellDamageMod(int32 Rank) const
void SetInCombatWithZone()
uint32 m_DBTableGuid
For new or temporary creatures is 0 for saved it is lowguid.
void ForcedDespawn(uint32 timeMSToDespawn=0)
VendorItemCounts m_vendorItemCounts
void SetHomePosition(float x, float y, float z, float o)
void SetNoSearchAssistance(bool val)
void SelectLevel(const CreatureTemplate *cinfo)
bool LoadCreaturesAddon(bool reload=false)
bool UpdateAllStats() OVERRIDE
void Respawn(bool force=false)
uint32 m_lootRecipientGroup
VendorItemData const * GetVendorItems() const
bool IsDungeonBoss() const
SpellSchoolMask m_meleeDamageSchoolMask
bool IsImmunedToSpellEffect(SpellInfo const *spellInfo, uint32 index) const OVERRIDE
int8 m_originalEquipmentId
void CallForHelp(float fRadius)
float GetAttackDistance(Unit const *player) const
uint32 GetDBTableGUIDLow() const
Player * SelectNearestPlayer(float distance=0) const
bool UpdateEntry(uint32 entry, uint32 team=ALLIANCE, const CreatureData *data=NULL)
virtual void DeleteFromDB()
void SetRespawnTime(uint32 respawn)
CreatureTemplate const * m_creatureInfo
void LoadEquipment(int8 id=1, bool force=false)
bool HasReactState(ReactStates state) const
void SendZoneUnderAttackMessage(Player *attacker)
Send a message to LocalDefense channel for players opposition team in the zone.
void AllLootRemovedFromCorpse()
float GetAggroRange(Unit const *target) const
void SetDisplayId(uint32 modelId) OVERRIDE
MovementGeneratorType m_defaultMovementType
void _AddCreatureCategoryCooldown(uint32 category, time_t apply_time)
void DespawnOrUnsummon(uint32 msTimeToDespawn=0)
SpellInfo const * reachWithSpellCure(Unit *victim)
void SetReactState(ReactStates st)
bool CanFly() const OVERRIDE
CreatureSpellCooldowns m_CreatureSpellCooldowns
void ResetPlayerDamageReq()
bool hasLootRecipient() const
void AddCreatureSpellCooldown(uint32 spellid)
void Update(uint32 time) OVERRIDE
uint8 getLevelForTarget(WorldObject const *target) const OVERRIDE
void ReleaseFocus(Spell const *focusSpell)
bool isRegeneratingHealth() const
CreatureSpellCooldowns m_CreatureCategoryCooldowns
void SetTarget(uint64 guid) OVERRIDE
void SetPosition(float x, float y, float z, float o)
bool CanAssistTo(const Unit *u, const Unit *enemy, bool checkfaction=true) const
time_t m_corpseRemoveTime
Timers.
void SetLootRecipient(Unit *unit)
void DoFleeToGetAssistance()
void RemoveCorpse(bool setSpawnTime=true)
void FarTeleportTo(Map *map, float X, float Y, float Z, float O)
uint32 GetScriptId() const
bool hasInvolvedQuest(uint32 quest_id) const OVERRIDE
CreatureData const * m_creatureData
bool isCanInteractWithBattleMaster(Player *player, bool msg) const
SpellInfo const * reachWithSpellAttack(Unit *victim)
Player * GetLootRecipient() const
static float _GetHealthMod(int32 Rank)
bool TriggerJustRespawned
bool m_AlreadyCallAssistance
CreatureTemplate const * GetCreatureTemplate() const
bool CanCreatureAttack(Unit const *victim, bool force=true) const
bool DisableReputationGain
void FocusTarget(Spell const *focusSpell, WorldObject const *target)
CreatureGroup * m_formation
MovementGeneratorType GetDefaultMovementType() const
void InitializeReactState()
bool HasSearchedAssistance() const
void GetRespawnPosition(float &x, float &y, float &z, float *ori=NULL, float *dist=NULL) const
bool CreateFromProto(uint32 guidlow, uint32 Entry, uint32 vehId, uint32 team, const CreatureData *data=NULL)
std::string GetAIName() const
void SetObjectScale(float scale) OVERRIDE
uint32 UpdateVendorItemCurrentCount(VendorItem const *vItem, uint32 used_count)
bool isTappedBy(Player const *player) const
Creature(bool isWorldObject=false)
bool m_AlreadySearchedAssistance
void UpdateMovementFlags()
bool HasSpell(uint32 spellID) const OVERRIDE
TrainerSpellData const * GetTrainerSpells() const
void SetFlying(bool enable)
bool IsImmunedToSpell(SpellInfo const *spellInfo) const OVERRIDE
bool AIM_Initialize(CreatureAI *ai=NULL)
Unit * SelectNearestHostileUnitInAggroRange(bool useLOS=false) const
bool _IsTargetAcceptable(const Unit *target) const
uint32 GetVendorItemCurrentCount(VendorItem const *vItem)
bool hasQuest(uint32 quest_id) const OVERRIDE
bool isCanTrainingAndResetTalentsOf(Player *player) const
Group * GetLootRecipientGroup() const
bool HasCategoryCooldown(uint32 spell_id) const
Spell const * _focusSpell
uint32 m_spells[CREATURE_MAX_SPELLS]
void AddToWorld() OVERRIDE
std::string GetScriptName() const
bool Create(uint32 guidlow, Map *map, uint32 Entry, uint32 vehId, uint32 team, float x, float y, float z, float ang, const CreatureData *data=NULL)
uint8 GetCurrentEquipmentId() const
virtual void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) OVERRIDE
Unit * SelectNearestTarget(float dist=0, bool playerOnly=false) const
void SetMeleeDamageSchool(SpellSchools school)
Unit * SelectNearestTargetInAttackDistance(float dist=0) const
bool LoadCreatureFromDB(uint32 guid, Map *map, bool addToMap=true)
uint32 lootingGroupLowGUID
bool HasSpellCooldown(uint32 spell_id) const
void SendAIReaction(AiReaction reactionType)
static float _GetDamageMod(int32 Rank)
void SetNoCallAssistance(bool val)
void setDeathState(DeathState s) OVERRIDE
void _AddCreatureSpellCooldown(uint32 spell_id, time_t end_time)
bool CanAlwaysSee(WorldObject const *obj) const OVERRIDE
void Regenerate(Powers power)
time_t GetRespawnTimeEx() const
CreatureAddon const * GetCreatureAddon() const
std::string const & GetNameForLocaleIdx(LocaleConstant locale_idx) const OVERRIDE
bool InitEntry(uint32 entry, uint32 team=ALLIANCE, const CreatureData *data=NULL)
bool IsInEvadeMode() const
void SaveRespawnTime() OVERRIDE
virtual uint32 GetPetAutoSpellOnPos(uint8 pos) const
bool IsInvisibleDueToDespawn() const OVERRIDE
bool CanStartAttack(Unit const *u, bool force) const
void LowerPlayerDamageReq(uint32 unDamage)
void SetOriginalEntry(uint32 entry)
void RemoveFromWorld() OVERRIDE
uint32 GetCreatureSpellCooldownDelay(uint32 spellId) const
bool Execute(uint64 e_time, uint32 p_time) OVERRIDE
GameObjectTemplate const * GetGOInfo() const
void CreatureRelocation(Creature *creature, float x, float y, float z, float ang, bool respawnRelocationOnFail=true)
float GetHeight(float x, float y, float z, bool checkVMap=true, float maxSearchDist=DEFAULT_HEIGHT_SEARCH) const
time_t GetCreatureRespawnTime(uint32 dbGuid) const
void SaveCreatureRespawnTime(uint32 dbGuid, time_t respawnTime)
Creature * GetCreature(uint64 guid)
void RemoveFromMap(T *, bool)
uint32 GetInstanceId() const
PlayerList const & GetPlayers() const
time_t GetLinkedRespawnTime(uint64 guid) const
void RemoveCreatureRespawnTime(uint32 dbGuid)
LinkedListHead::Iterator< MapReference const > const_iterator
MovementGeneratorType GetCurrentMovementGeneratorType() const
void MoveSeekAssistance(float x, float y, float z)
static Unit * GetUnit(WorldObject const &, uint64 guid)
static Player * FindPlayer(uint64)
uint8 GetByteValue(uint16 index, uint8 offset) const
void SetByteValue(uint16 index, uint8 offset, uint8 value)
float GetObjectScale() const
uint32 GetUInt32Value(uint16 index) const
uint32 GetGUIDLow() const
void _Create(uint32 guidlow, uint32 entry, HighGuid guidhigh)
void SetFlag(uint16 index, uint32 newFlag)
void RemoveFlag(uint16 index, uint32 oldFlag)
float GetFloatValue(uint16 index) const
void SetFloatValue(uint16 index, float value)
bool HasFlag(uint16 index, uint32 flag) const
void SetEntry(uint32 entry)
virtual void SetObjectScale(float scale)
void SetUInt32Value(uint16 index, uint32 value)
void SetUInt64Value(uint16 index, uint64 value)
static uint32 ChooseDisplayId(CreatureTemplate const *cinfo, CreatureData const *data=NULL)
static void ChooseCreatureFlags(CreatureTemplate const *cinfo, uint32 &npcflag, uint32 &unit_flags, uint32 &dynamicflags, CreatureData const *data=NULL)
bool IsGameMaster() const
PlayerMenu * PlayerTalkClass
bool GetBGAccessByLevel(BattlegroundTypeId bgTypeId) const
void setFloat(const uint8 index, const float value)
void setUInt16(const uint8 index, const uint16 value)
void setUInt32(const uint8 index, const uint32 value)
void setUInt8(const uint8 index, const uint8 value)
void setInt32(const uint8 index, const int32 value)
SpellInfo const * GetSpellInfo() const
SpellEffectInfo Effects[MAX_SPELL_EFFECTS]
uint32 GetCategory() const
bool IsCooldownStartedOnEvent() const
uint32 GetRecoveryTime() const
float GetMinRange(bool positive=false) const
uint32 CategoryRecoveryTime
float GetMaxRange(bool positive=false, Unit *caster=NULL, Spell *spell=NULL) const
SpellSchoolMask GetSchoolMask() const
virtual void AttackStart(Unit *)
int32 ModifyHealth(int32 val)
void ClearUnitState(uint32 f)
bool IsBattleMaster() const
bool isTargetableForAttack(bool checkFakeDeath=true) const
AuraEffectList const & GetAuraEffectsByType(AuraType type) const
void setFaction(uint32 faction)
bool CanHaveThreatList() const
bool IsValidAttackTarget(Unit const *target) const
bool SetFall(bool enable)
void UpdateObjectVisibility(bool forced=true) override
uint32 getFaction() const
void SetAnimTier(AnimTier tier)
void AddToWorld() override
bool SetPhased(uint32 id, bool update, bool apply) OVERRIDE
void SetControlled(bool apply, UnitState state)
void SetCreateHealth(uint32 val)
void SetPower(Powers power, int32 val)
Player * GetSpellModOwner() const
uint64 GetCharmerOrOwnerGUID() const
bool IsPolymorphed() const
void SetBaseWeaponDamage(WeaponAttackType attType, WeaponDamageRange damageRange, float value)
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=NULL)
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
float GetPositionZMinusOffset() const
Unit * getAttackerForHelper() const
MotionMaster * GetMotionMaster()
uint8 getLevelForTarget(WorldObject const *) const override
uint32 GetMaxHealth() const
Aura * AddAura(uint32 spellId, Unit *target)
bool IsLevitating() const
void CombatStart(Unit *target, bool initialAggro=true)
bool IsOnVehicle(const Unit *vehicle) const
void SetClass(uint8 newClass)
int32 GetMaxPower(Powers power) const
void SetHealth(uint32 val)
TempSummon * ToTempSummon()
int32 ModifyPower(Powers power, int32 val)
bool IsNeutralToAll() const
bool HasAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
void AddUnitState(uint32 f)
void Mount(uint32 mount, uint32 vehicleId=0, uint32 creatureEntry=0)
void SetCreateMana(uint32 val)
bool isInAccessiblePlaceFor(Creature const *c) const
virtual void SetSheath(SheathState sheathed)
Unit * GetCharmerOrOwner() const
MotionMaster i_motionMaster
uint32 GetCreatureType() const
bool SetSwim(bool enable)
virtual bool IsImmunedToSpell(SpellInfo const *spellInfo) const
uint32 GetDisplayId() const
static Creature * GetCreature(WorldObject &object, uint64 guid)
uint32 GetNativeDisplayId() const
void AddUnitMovementFlag(uint32 f)
bool SetCanFly(bool enable)
bool HasUnitMovementFlag(uint32 f) const
virtual bool IsInWater() const
void SetGender(uint8 gender)
bool HasAuraType(AuraType auraType) const
static Unit * GetUnit(WorldObject &object, uint64 guid)
void SetNativeDisplayId(uint32 modelId)
virtual void SetDisplayId(uint32 modelId)
void CleanupBeforeRemoveFromMap(bool finalCleanup)
int32 GetPower(Powers power) const
DeathState getDeathState() const
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
bool CreateVehicleKit(uint32 id, uint32 creatureEntry, bool loading=false)
virtual bool IsImmunedToSpellEffect(SpellInfo const *spellInfo, uint32 index) const
bool HasUnitState(const uint32 f) const
void SetModifierValue(UnitMods unitMod, UnitModifierType modifierType, float value)
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply)
void SetCanModifyStats(bool modifyStats)
bool IsFriendlyTo(Unit const *unit) const
int32 GetTotalAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const
void RemoveFromWorld() override
float GetStat(Stats stat) const
void UpdateSpeed(UnitMoveType mtype, bool forced)
void SetMaxPower(Powers power, int32 val)
bool SetDisableGravity(bool disable, bool packetOnly=false)
Powers getPowerType() const
virtual void setDeathState(DeathState s)
void SetMaxHealth(uint32 val)
int32 GetTotalAuraModifier(AuraType auratype) const
std::list< AuraEffect * > AuraEffectList
void SetAttackTime(WeaponAttackType att, uint32 val)
bool IsSpiritHealer() const
void SetInFront(WorldObject const *target)
void setPowerType(Powers power)
Vehicle * GetVehicleKit() const
bool IsHostileTo(Unit const *unit) const
bool IsSpiritService() const
void Update(uint32 time) OVERRIDE
void SetInCombatWith(Unit *enemy)
bool IsSpiritGuide() const
void Reset(bool evading=false)
Reapplies immunities and reinstalls accessories. Only has effect for creatures.
void Install()
Initializes power type for vehicle. Nothing more.
void RelocatePassengers()
Relocate passengers. Must be called after m_base::Relocate.
uint32 GetPhaseMask() const
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true) const
bool IsWithinLOSInMap(WorldObject const *obj) const
virtual bool IsInvisibleDueToDespawn() const
float GetTransOffsetX() const
void SetName(std::string const &newname)
void setActive(bool isActiveObject)
ZoneScript * m_zoneScript
float GetTransOffsetY() const
std::string const & GetName() const
virtual void SetMap(Map *map)
float GetTransOffsetZ() const
void VisitNearbyObject(float const &radius, NOTIFIER ¬ifier) const
void VisitNearbyGridObject(float const &radius, NOTIFIER ¬ifier) const
WorldObject(bool isWorldObject)
void DestroyForNearbyPlayers()
Transport * GetTransport() const
FlaggedValuesArray32< int32, uint32, ServerSideVisibilityType, TOTAL_SERVERSIDE_VISIBILITY_TYPES > m_serverSideVisibilityDetect
float GetDistance(WorldObject const *obj) const
float GetTransOffsetO() const
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true) const
FlaggedValuesArray32< int32, uint32, ServerSideVisibilityType, TOTAL_SERVERSIDE_VISIBILITY_TYPES > m_serverSideVisibility
float GetDistanceZ(WorldObject const *obj) const
bool IsInMap(WorldObject const *obj) const
WorldDatabaseWorkerPool WorldDatabase
Accessor to the world database.
@ CONFIG_CORPSE_DECAY_NORMAL
@ CONFIG_CORPSE_DECAY_RARE
@ CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY
@ CONFIG_CORPSE_DECAY_ELITE
@ CONFIG_WORLD_BOSS_LEVEL_DIFF
@ CONFIG_CORPSE_DECAY_RAREELITE
@ CONFIG_MAX_PLAYER_LEVEL
@ CONFIG_CORPSE_DECAY_WORLDBOSS
@ CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY
@ RATE_CREATURE_ELITE_RARE_SPELLDAMAGE
@ RATE_CREATURE_ELITE_WORLDBOSS_HP
@ RATE_CREATURE_ELITE_RAREELITE_DAMAGE
@ RATE_CREATURE_ELITE_RAREELITE_HP
@ RATE_CREATURE_NORMAL_SPELLDAMAGE
@ RATE_CREATURE_ELITE_ELITE_HP
@ RATE_CREATURE_ELITE_WORLDBOSS_SPELLDAMAGE
@ RATE_CREATURE_NORMAL_DAMAGE
@ RATE_CREATURE_NORMAL_HP
@ RATE_CREATURE_ELITE_RARE_HP
@ RATE_CORPSE_DECAY_LOOTED
@ RATE_CREATURE_ELITE_ELITE_DAMAGE
@ RATE_CREATURE_ELITE_RAREELITE_SPELLDAMAGE
@ RATE_CREATURE_ELITE_WORLDBOSS_DAMAGE
@ RATE_CREATURE_ELITE_RARE_DAMAGE
@ RATE_CREATURE_ELITE_ELITE_SPELLDAMAGE
@ CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS
@ CONFIG_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS
CreatureAI * selectAI(Creature *creature)
bool IsValidMapCoord(float c)
CellCoord ComputeCellCoord(float x, float y)
void Visit(CellCoord const &, TypeContainerVisitor< T, CONTAINER > &visitor, Map &, WorldObject const &, float) const
std::vector< uint32 > auras
uint32 BaseHealth[MAX_CREATURE_BASE_HP]
static CreatureBaseStats const * GetBaseStats(uint8 level, uint8 unitClass)
uint32 GenerateMana(CreatureTemplate const *info) const
uint32 GenerateHealth(CreatureTemplate const *info) const
uint32 GenerateArmor(CreatureTemplate const *info) const
uint32 GetFirstValidModelId() const
int32 resistance[MAX_SPELL_SCHOOL]
uint32 DifficultyEntry[4 - 1]
static int32 DiffToDiffIndex(uint32 difficulty)
uint32 spells[CREATURE_MAX_SPELLS]
uint32 GetRandomValidModelId() const
uint32 ItemEntry[MAX_EQUIPMENT_ITEMS]
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@316212233253022127367165230227137227160036113140 moTransport
float GetPositionZ() const
float GetOrientation() const
bool IsInDist(float x, float y, float z, float dist) const
bool IsPositionValid() const
float GetPositionX() const
float GetPositionY() const
void Relocate(float x, float y)
TrainerSpellMap spellList
TrainerSpell const * Find(uint32 spell_id) const
VendorItem const * FindItemCostPair(uint32 item_id, uint32 extendedCost, uint8 type) const
bool RemoveItem(uint32 item_id, uint8 type)