mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 09:06:46 +00:00
Merge remote-tracking branch 'remotes/origin/master' into logging_changes
Conflicts: world/client.cpp world/worlddb.cpp zone/aggro.cpp zone/bot.cpp zone/client.cpp zone/client_packet.cpp zone/client_process.cpp zone/doors.cpp zone/entity.cpp zone/inventory.cpp zone/mob_ai.cpp zone/perl_client.cpp zone/spells.cpp zone/waypoints.cpp zone/zone.cpp zone/zonedb.cpp zone/zoning.cpp
This commit is contained in:
+50
-78
@@ -22,6 +22,7 @@
|
||||
#include "entity.h"
|
||||
#include "hate_list.h"
|
||||
#include "pathing.h"
|
||||
#include "position.h"
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
@@ -77,10 +78,7 @@ public:
|
||||
uint32 in_npctype_id,
|
||||
float in_size,
|
||||
float in_runspeed,
|
||||
float in_heading,
|
||||
float in_x_pos,
|
||||
float in_y_pos,
|
||||
float in_z_pos,
|
||||
const xyz_heading& position,
|
||||
uint8 in_light,
|
||||
uint8 in_texture,
|
||||
uint8 in_helmtexture,
|
||||
@@ -183,7 +181,7 @@ public:
|
||||
bool IsInvisible(Mob* other = 0) const;
|
||||
void SetInvisible(uint8 state);
|
||||
bool AttackAnimation(SkillUseTypes &skillinuse, int Hand, const ItemInst* weapon);
|
||||
|
||||
|
||||
//Song
|
||||
bool UseBardSpellLogic(uint16 spell_id = 0xffff, int slot = -1);
|
||||
bool ApplyNextBardPulse(uint16 spell_id, Mob *spell_target, uint16 slot);
|
||||
@@ -282,7 +280,7 @@ public:
|
||||
int16 GetBuffSlotFromType(uint16 type);
|
||||
uint16 GetSpellIDFromSlot(uint8 slot);
|
||||
int CountDispellableBuffs();
|
||||
void CheckNumHitsRemaining(uint8 type, int32 buff_slot=-1, uint16 spell_id=SPELL_UNKNOWN);
|
||||
void CheckNumHitsRemaining(NumHit type, int32 buff_slot = -1, uint16 spell_id = SPELL_UNKNOWN);
|
||||
bool HasNumhits() const { return has_numhits; }
|
||||
inline void Numhits(bool val) { has_numhits = val; }
|
||||
bool HasMGB() const { return has_MGB; }
|
||||
@@ -296,9 +294,10 @@ public:
|
||||
inline virtual uint32 GetNimbusEffect2() const { return nimbus_effect2; }
|
||||
inline virtual uint32 GetNimbusEffect3() const { return nimbus_effect3; }
|
||||
void RemoveNimbusEffect(int effectid);
|
||||
inline float GetTargetRingX() const { return targetring_x; }
|
||||
inline float GetTargetRingY() const { return targetring_y; }
|
||||
inline float GetTargetRingZ() const { return targetring_z; }
|
||||
inline const xyz_location& GetTargetRingLocation() const { return m_TargetRing; }
|
||||
inline float GetTargetRingX() const { return m_TargetRing.m_X; }
|
||||
inline float GetTargetRingY() const { return m_TargetRing.m_Y; }
|
||||
inline float GetTargetRingZ() const { return m_TargetRing.m_Z; }
|
||||
inline bool HasEndurUpkeep() const { return endur_upkeep; }
|
||||
inline void SetEndurUpkeep(bool val) { endur_upkeep = val; }
|
||||
|
||||
@@ -400,18 +399,19 @@ public:
|
||||
((static_cast<float>(cur_mana) / max_mana) * 100); }
|
||||
virtual int32 CalcMaxMana();
|
||||
uint32 GetNPCTypeID() const { return npctype_id; }
|
||||
inline const float GetX() const { return x_pos; }
|
||||
inline const float GetY() const { return y_pos; }
|
||||
inline const float GetZ() const { return z_pos; }
|
||||
inline const float GetHeading() const { return heading; }
|
||||
inline const xyz_heading GetPosition() const { return m_Position; }
|
||||
inline const float GetX() const { return m_Position.m_X; }
|
||||
inline const float GetY() const { return m_Position.m_Y; }
|
||||
inline const float GetZ() const { return m_Position.m_Z; }
|
||||
inline const float GetHeading() const { return m_Position.m_Heading; }
|
||||
inline const float GetSize() const { return size; }
|
||||
inline const float GetBaseSize() const { return base_size; }
|
||||
inline const float GetTarX() const { return tarx; }
|
||||
inline const float GetTarY() const { return tary; }
|
||||
inline const float GetTarZ() const { return tarz; }
|
||||
inline const float GetTarVX() const { return tar_vx; }
|
||||
inline const float GetTarVY() const { return tar_vy; }
|
||||
inline const float GetTarVZ() const { return tar_vz; }
|
||||
inline const float GetTarX() const { return m_TargetLocation.m_X; }
|
||||
inline const float GetTarY() const { return m_TargetLocation.m_Y; }
|
||||
inline const float GetTarZ() const { return m_TargetLocation.m_Z; }
|
||||
inline const float GetTarVX() const { return m_TargetV.m_X; }
|
||||
inline const float GetTarVY() const { return m_TargetV.m_Y; }
|
||||
inline const float GetTarVZ() const { return m_TargetV.m_Z; }
|
||||
inline const float GetTarVector() const { return tar_vector; }
|
||||
inline const uint8 GetTarNDX() const { return tar_ndx; }
|
||||
bool IsBoat() const;
|
||||
@@ -426,9 +426,9 @@ public:
|
||||
virtual inline int32 GetPrimaryFaction() const { return 0; }
|
||||
|
||||
//Movement
|
||||
void Warp( float x, float y, float z );
|
||||
void Warp(const xyz_location& location);
|
||||
inline bool IsMoving() const { return moving; }
|
||||
virtual void SetMoving(bool move) { moving = move; delta_x = 0; delta_y = 0; delta_z = 0; delta_heading = 0; }
|
||||
virtual void SetMoving(bool move) { moving = move; m_Delta = xyz_heading::Origin(); }
|
||||
virtual void GoToBind(uint8 bindnum = 0) { }
|
||||
virtual void Gate();
|
||||
float GetWalkspeed() const { return(_GetMovementSpeed(-47)); }
|
||||
@@ -438,15 +438,15 @@ public:
|
||||
bool IsRunning() const { return m_is_running; }
|
||||
void SetRunning(bool val) { m_is_running = val; }
|
||||
virtual void GMMove(float x, float y, float z, float heading = 0.01, bool SendUpdate = true);
|
||||
void SetDeltas(float delta_x, float delta_y, float delta_z, float delta_h);
|
||||
void SetDelta(const xyz_heading& delta);
|
||||
void SetTargetDestSteps(uint8 target_steps) { tar_ndx = target_steps; }
|
||||
void SendPosUpdate(uint8 iSendToSelf = 0);
|
||||
void MakeSpawnUpdateNoDelta(PlayerPositionUpdateServer_Struct* spu);
|
||||
void MakeSpawnUpdate(PlayerPositionUpdateServer_Struct* spu);
|
||||
void SendPosition();
|
||||
void SetFlyMode(uint8 flymode);
|
||||
inline void Teleport(Map::Vertex NewPosition) { x_pos = NewPosition.x; y_pos = NewPosition.y;
|
||||
z_pos = NewPosition.z; };
|
||||
inline void Teleport(Map::Vertex NewPosition) { m_Position.m_X = NewPosition.x; m_Position.m_Y = NewPosition.y;
|
||||
m_Position.m_Z = NewPosition.z; };
|
||||
|
||||
//AI
|
||||
static uint32 GetLevelCon(uint8 mylevel, uint8 iOtherLevel);
|
||||
@@ -467,8 +467,8 @@ public:
|
||||
bool IsEngaged() { return(!hate_list.IsHateListEmpty()); }
|
||||
bool HateSummon();
|
||||
void FaceTarget(Mob* MobToFace = 0);
|
||||
void SetHeading(float iHeading) { if(heading != iHeading) { pLastChange = Timer::GetCurrentTime();
|
||||
heading = iHeading; } }
|
||||
void SetHeading(float iHeading) { if(m_Position.m_Heading != iHeading) { pLastChange = Timer::GetCurrentTime();
|
||||
m_Position.m_Heading = iHeading; } }
|
||||
void WipeHateList();
|
||||
void AddFeignMemory(Client* attacker);
|
||||
void RemoveFromFeignMemory(Client* attacker);
|
||||
@@ -511,13 +511,6 @@ public:
|
||||
void ShowStats(Client* client);
|
||||
void ShowBuffs(Client* client);
|
||||
void ShowBuffList(Client* client);
|
||||
float Dist(const Mob &) const;
|
||||
float DistNoZ(const Mob &) const;
|
||||
float DistNoRoot(const Mob &) const;
|
||||
float DistNoRoot(float x, float y, float z) const;
|
||||
float DistNoRootNoZ(float x, float y) const;
|
||||
float DistNoRootNoZ(const Mob &) const;
|
||||
static float GetReciprocalHeading(Mob* target);
|
||||
bool PlotPositionAroundTarget(Mob* target, float &x_dest, float &y_dest, float &z_dest,
|
||||
bool lookForAftArc = true);
|
||||
|
||||
@@ -569,10 +562,10 @@ public:
|
||||
|
||||
int16 CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, bool best_focus=false);
|
||||
uint8 IsFocusEffect(uint16 spellid, int effect_index, bool AA=false,uint32 aa_effect=0);
|
||||
void SendIllusionPacket(uint16 in_race, uint8 in_gender = 0xFF, uint8 in_texture = 0xFF, uint8 in_helmtexture = 0xFF,
|
||||
uint8 in_haircolor = 0xFF, uint8 in_beardcolor = 0xFF, uint8 in_eyecolor1 = 0xFF, uint8 in_eyecolor2 = 0xFF,
|
||||
uint8 in_hairstyle = 0xFF, uint8 in_luclinface = 0xFF, uint8 in_beard = 0xFF, uint8 in_aa_title = 0xFF,
|
||||
uint32 in_drakkin_heritage = 0xFFFFFFFF, uint32 in_drakkin_tattoo = 0xFFFFFFFF,
|
||||
void SendIllusionPacket(uint16 in_race, uint8 in_gender = 0xFF, uint8 in_texture = 0xFF, uint8 in_helmtexture = 0xFF,
|
||||
uint8 in_haircolor = 0xFF, uint8 in_beardcolor = 0xFF, uint8 in_eyecolor1 = 0xFF, uint8 in_eyecolor2 = 0xFF,
|
||||
uint8 in_hairstyle = 0xFF, uint8 in_luclinface = 0xFF, uint8 in_beard = 0xFF, uint8 in_aa_title = 0xFF,
|
||||
uint32 in_drakkin_heritage = 0xFFFFFFFF, uint32 in_drakkin_tattoo = 0xFFFFFFFF,
|
||||
uint32 in_drakkin_details = 0xFFFFFFFF, float in_size = -1.0f);
|
||||
bool RandomizeFeatures(bool send_illusion = true, bool set_variables = true);
|
||||
virtual void Stun(int duration);
|
||||
@@ -621,7 +614,7 @@ public:
|
||||
bool CanBlockSpell() const { return(spellbonuses.BlockNextSpell); }
|
||||
bool DoHPToManaCovert(uint16 mana_cost = 0);
|
||||
int32 ApplySpellEffectiveness(Mob* caster, int16 spell_id, int32 value, bool IsBard = false);
|
||||
int8 GetDecayEffectValue(uint16 spell_id, uint16 spelleffect);
|
||||
int8 GetDecayEffectValue(uint16 spell_id, uint16 spelleffect);
|
||||
int32 GetExtraSpellAmt(uint16 spell_id, int32 extra_spell_amt, int32 base_spell_dmg);
|
||||
void MeleeLifeTap(int32 damage);
|
||||
bool PassCastRestriction(bool UseCastRestriction = true, int16 value = 0, bool IsDamage = true);
|
||||
@@ -682,9 +675,9 @@ public:
|
||||
inline int16 GetTempPetCount() const { return count_TempPet; }
|
||||
inline void SetTempPetCount(int16 i) { count_TempPet = i; }
|
||||
bool HasPetAffinity() { if (aabonuses.GivePetGroupTarget || itembonuses.GivePetGroupTarget || spellbonuses.GivePetGroupTarget) return true; return false; }
|
||||
inline bool IsPetOwnerClient() const { return pet_owner_client; }
|
||||
inline bool IsPetOwnerClient() const { return pet_owner_client; }
|
||||
inline void SetPetOwnerClient(bool value) { pet_owner_client = value; }
|
||||
inline bool IsTempPet() const { return _IsTempPet; }
|
||||
inline bool IsTempPet() const { return _IsTempPet; }
|
||||
inline void SetTempPet(bool value) { _IsTempPet = value; }
|
||||
|
||||
inline const bodyType GetBodyType() const { return bodytype; }
|
||||
@@ -815,10 +808,10 @@ public:
|
||||
void SetDontCureMeBefore(uint32 time) { pDontCureMeBefore = time; }
|
||||
|
||||
// calculate interruption of spell via movement of mob
|
||||
void SaveSpellLoc() {spell_x = x_pos; spell_y = y_pos; spell_z = z_pos; }
|
||||
inline float GetSpellX() const {return spell_x;}
|
||||
inline float GetSpellY() const {return spell_y;}
|
||||
inline float GetSpellZ() const {return spell_z;}
|
||||
void SaveSpellLoc() {m_SpellLocation = m_Position; }
|
||||
inline float GetSpellX() const {return m_SpellLocation.m_X;}
|
||||
inline float GetSpellY() const {return m_SpellLocation.m_Y;}
|
||||
inline float GetSpellZ() const {return m_SpellLocation.m_Z;}
|
||||
inline bool IsGrouped() const { return isgrouped; }
|
||||
void SetGrouped(bool v);
|
||||
inline bool IsRaidGrouped() const { return israidgrouped; }
|
||||
@@ -869,11 +862,8 @@ public:
|
||||
|
||||
Shielders_Struct shielder[MAX_SHIELDERS];
|
||||
Trade* trade;
|
||||
|
||||
inline float GetCWPX() const { return(cur_wp_x); }
|
||||
inline float GetCWPY() const { return(cur_wp_y); }
|
||||
inline float GetCWPZ() const { return(cur_wp_z); }
|
||||
inline float GetCWPH() const { return(cur_wp_heading); }
|
||||
|
||||
inline xyz_heading GetCurrentWayPoint() const { return m_CurrentWayPoint; }
|
||||
inline float GetCWPP() const { return(static_cast<float>(cur_wp_pause)); }
|
||||
inline int GetCWP() const { return(cur_wp); }
|
||||
void SetCurrentWP(uint16 waypoint) { cur_wp = waypoint; }
|
||||
@@ -1017,10 +1007,7 @@ protected:
|
||||
uint8 level;
|
||||
uint8 orig_level;
|
||||
uint32 npctype_id;
|
||||
float x_pos;
|
||||
float y_pos;
|
||||
float z_pos;
|
||||
float heading;
|
||||
xyz_heading m_Position;
|
||||
uint16 animation;
|
||||
float base_size;
|
||||
float size;
|
||||
@@ -1069,10 +1056,7 @@ protected:
|
||||
char clean_name[64];
|
||||
char lastname[64];
|
||||
|
||||
int32 delta_heading;
|
||||
float delta_x;
|
||||
float delta_y;
|
||||
float delta_z;
|
||||
xyz_heading m_Delta;
|
||||
|
||||
uint8 light;
|
||||
|
||||
@@ -1081,7 +1065,6 @@ protected:
|
||||
uint8 pRunAnimSpeed;
|
||||
bool m_is_running;
|
||||
|
||||
|
||||
Timer attack_timer;
|
||||
Timer attack_dw_timer;
|
||||
Timer ranged_timer;
|
||||
@@ -1094,7 +1077,7 @@ protected:
|
||||
//spell casting vars
|
||||
Timer spellend_timer;
|
||||
uint16 casting_spell_id;
|
||||
float spell_x, spell_y, spell_z;
|
||||
xyz_location m_SpellLocation;
|
||||
int attacked_count;
|
||||
bool delaytimer;
|
||||
uint16 casting_spell_targetid;
|
||||
@@ -1113,9 +1096,8 @@ protected:
|
||||
bool ActiveProjectileATK;
|
||||
tProjatk ProjectileAtk[MAX_SPELL_PROJECTILE];
|
||||
|
||||
float rewind_x;
|
||||
float rewind_y;
|
||||
float rewind_z;
|
||||
xyz_location m_RewindLocation;
|
||||
|
||||
Timer rewind_timer;
|
||||
|
||||
// Currently 3 max nimbus particle effects at a time
|
||||
@@ -1211,16 +1193,12 @@ protected:
|
||||
int pausetype;
|
||||
|
||||
int cur_wp;
|
||||
float cur_wp_x;
|
||||
float cur_wp_y;
|
||||
float cur_wp_z;
|
||||
xyz_heading m_CurrentWayPoint;
|
||||
int cur_wp_pause;
|
||||
float cur_wp_heading;
|
||||
|
||||
|
||||
int patrol;
|
||||
float fear_walkto_x;
|
||||
float fear_walkto_y;
|
||||
float fear_walkto_z;
|
||||
xyz_location m_FearWalkTarget;
|
||||
bool curfp;
|
||||
|
||||
// Pathing
|
||||
@@ -1255,19 +1233,13 @@ protected:
|
||||
bool pet_owner_client; //Flags regular and pets as belonging to a client
|
||||
|
||||
EGNode *_egnode; //the EG node we are in
|
||||
float tarx;
|
||||
float tary;
|
||||
float tarz;
|
||||
xyz_location m_TargetLocation;
|
||||
uint8 tar_ndx;
|
||||
float tar_vector;
|
||||
float tar_vx;
|
||||
float tar_vy;
|
||||
float tar_vz;
|
||||
xyz_location m_TargetV;
|
||||
float test_vector;
|
||||
|
||||
float targetring_x;
|
||||
float targetring_y;
|
||||
float targetring_z;
|
||||
xyz_location m_TargetRing;
|
||||
|
||||
uint32 m_spellHitsLeft[38]; // Used to track which spells will have their numhits incremented when spell finishes casting, 38 Buffslots
|
||||
int flymode;
|
||||
|
||||
Reference in New Issue
Block a user