mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
More warning clean ups (NULL to 0 on int, sprintf flags, typedef on enum)
This commit is contained in:
parent
950f00fae6
commit
0c6eee6d81
1336
zone/bot.cpp
1336
zone/bot.cpp
File diff suppressed because it is too large
Load Diff
20
zone/bot.h
20
zone/bot.h
@ -32,7 +32,7 @@ const int MaxSpellTypes = 16;
|
|||||||
const int MaxHealRotationMembers = 6;
|
const int MaxHealRotationMembers = 6;
|
||||||
const int MaxHealRotationTargets = 3;
|
const int MaxHealRotationTargets = 3;
|
||||||
|
|
||||||
typedef enum BotStanceType {
|
enum BotStanceType {
|
||||||
BotStancePassive,
|
BotStancePassive,
|
||||||
BotStanceBalanced,
|
BotStanceBalanced,
|
||||||
BotStanceEfficient,
|
BotStanceEfficient,
|
||||||
@ -42,7 +42,7 @@ typedef enum BotStanceType {
|
|||||||
BotStanceBurnAE
|
BotStanceBurnAE
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum SpellTypeIndex {
|
enum SpellTypeIndex {
|
||||||
SpellType_NukeIndex,
|
SpellType_NukeIndex,
|
||||||
SpellType_HealIndex,
|
SpellType_HealIndex,
|
||||||
SpellType_RootIndex,
|
SpellType_RootIndex,
|
||||||
@ -64,7 +64,7 @@ typedef enum SpellTypeIndex {
|
|||||||
class Bot : public NPC {
|
class Bot : public NPC {
|
||||||
public:
|
public:
|
||||||
// Class enums
|
// Class enums
|
||||||
typedef enum BotfocusType { //focus types
|
enum BotfocusType { //focus types
|
||||||
BotfocusSpellHaste = 1,
|
BotfocusSpellHaste = 1,
|
||||||
BotfocusSpellDuration,
|
BotfocusSpellDuration,
|
||||||
BotfocusRange,
|
BotfocusRange,
|
||||||
@ -97,18 +97,18 @@ public:
|
|||||||
BotfocusAdditionalHeal,
|
BotfocusAdditionalHeal,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum BotTradeType { // types of trades a bot can do
|
enum BotTradeType { // types of trades a bot can do
|
||||||
BotTradeClientNormal,
|
BotTradeClientNormal,
|
||||||
BotTradeClientNoDropNoTrade
|
BotTradeClientNoDropNoTrade
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum BotRoleType {
|
enum BotRoleType {
|
||||||
BotRoleMainAssist,
|
BotRoleMainAssist,
|
||||||
BotRoleGroupHealer,
|
BotRoleGroupHealer,
|
||||||
BotRoleRaidHealer
|
BotRoleRaidHealer
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum EqExpansions {
|
enum EqExpansions {
|
||||||
ExpansionNone,
|
ExpansionNone,
|
||||||
ExpansionEQ,
|
ExpansionEQ,
|
||||||
ExpansionRoK,
|
ExpansionRoK,
|
||||||
@ -143,7 +143,7 @@ public:
|
|||||||
virtual bool HasGroup() { return (GetGroup() ? true : false); }
|
virtual bool HasGroup() { return (GetGroup() ? true : false); }
|
||||||
virtual Raid* GetRaid() { return entity_list.GetRaidByMob(this); }
|
virtual Raid* GetRaid() { return entity_list.GetRaidByMob(this); }
|
||||||
virtual Group* GetGroup() { return entity_list.GetGroupByMob(this); }
|
virtual Group* GetGroup() { return entity_list.GetGroupByMob(this); }
|
||||||
|
|
||||||
// Common, but informal "interfaces" with Client object
|
// Common, but informal "interfaces" with Client object
|
||||||
uint32 CharacterID() { return GetBotID(); } // Just returns the Bot Id
|
uint32 CharacterID() { return GetBotID(); } // Just returns the Bot Id
|
||||||
inline bool IsInAGuild() const { return (_guildId != GUILD_NONE && _guildId != 0); }
|
inline bool IsInAGuild() const { return (_guildId != GUILD_NONE && _guildId != 0); }
|
||||||
@ -237,7 +237,7 @@ public:
|
|||||||
bool RemoveHealRotationTarget( Mob* target );
|
bool RemoveHealRotationTarget( Mob* target );
|
||||||
bool RemoveHealRotationTarget( int index);
|
bool RemoveHealRotationTarget( int index);
|
||||||
void NotifyNextHealRotationMember( bool notifyNow = false );
|
void NotifyNextHealRotationMember( bool notifyNow = false );
|
||||||
void ClearHealRotationLeader() { _healRotationLeader = NULL; }
|
void ClearHealRotationLeader() { _healRotationLeader = 0; }
|
||||||
void ClearHealRotationMembers();
|
void ClearHealRotationMembers();
|
||||||
void ClearHealRotationTargets();
|
void ClearHealRotationTargets();
|
||||||
inline virtual int16 GetMaxStat();
|
inline virtual int16 GetMaxStat();
|
||||||
@ -285,7 +285,7 @@ public:
|
|||||||
int32 CalcEnduranceRegen(); //Calculates endurance regen used in DoEnduranceRegen()
|
int32 CalcEnduranceRegen(); //Calculates endurance regen used in DoEnduranceRegen()
|
||||||
int32 GetEndurance() const {return cur_end;} //This gets our current endurance
|
int32 GetEndurance() const {return cur_end;} //This gets our current endurance
|
||||||
int32 GetMaxEndurance() const {return max_end;} //This gets our endurance from the last CalcMaxEndurance() call
|
int32 GetMaxEndurance() const {return max_end;} //This gets our endurance from the last CalcMaxEndurance() call
|
||||||
int32 CalcEnduranceRegenCap();
|
int32 CalcEnduranceRegenCap();
|
||||||
inline uint8 GetEndurancePercent() { return (uint8)((float)cur_end / (float)max_end * 100.0f); }
|
inline uint8 GetEndurancePercent() { return (uint8)((float)cur_end / (float)max_end * 100.0f); }
|
||||||
void SetEndurance(int32 newEnd); //This sets the current endurance to the new value
|
void SetEndurance(int32 newEnd); //This sets the current endurance to the new value
|
||||||
void DoEnduranceRegen(); //This Regenerates endurance
|
void DoEnduranceRegen(); //This Regenerates endurance
|
||||||
@ -516,7 +516,7 @@ public:
|
|||||||
inline virtual int16 GetPercMod() const { return itembonuses.percussionMod; }
|
inline virtual int16 GetPercMod() const { return itembonuses.percussionMod; }
|
||||||
inline virtual int16 GetStringMod() const { return itembonuses.stringedMod; }
|
inline virtual int16 GetStringMod() const { return itembonuses.stringedMod; }
|
||||||
inline virtual int16 GetWindMod() const { return itembonuses.windMod; }
|
inline virtual int16 GetWindMod() const { return itembonuses.windMod; }
|
||||||
|
|
||||||
inline virtual int16 GetDelayDeath() const { return aabonuses.DelayDeath + spellbonuses.DelayDeath + itembonuses.DelayDeath; }
|
inline virtual int16 GetDelayDeath() const { return aabonuses.DelayDeath + spellbonuses.DelayDeath + itembonuses.DelayDeath; }
|
||||||
|
|
||||||
inline InspectMessage_Struct& GetInspectMessage() { return _botInspectMessage; }
|
inline InspectMessage_Struct& GetInspectMessage() { return _botInspectMessage; }
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1812,7 +1812,7 @@ void Merc::AI_Process() {
|
|||||||
//now off hand
|
//now off hand
|
||||||
if(GetTarget() && attack_dw_timer.Check() && CanThisClassDualWield()) {
|
if(GetTarget() && attack_dw_timer.Check() && CanThisClassDualWield()) {
|
||||||
|
|
||||||
int weapontype = NULL;
|
int weapontype = 0; // No weapon type
|
||||||
bool bIsFist = true;
|
bool bIsFist = true;
|
||||||
|
|
||||||
if(bIsFist || ((weapontype != ItemType2HS) && (weapontype != ItemType2HPierce) && (weapontype != ItemType2HB))) {
|
if(bIsFist || ((weapontype != ItemType2HS) && (weapontype != ItemType2HPierce) && (weapontype != ItemType2HB))) {
|
||||||
@ -2362,8 +2362,8 @@ bool Merc::AICastSpell(int8 iChance, int32 iSpellTypes) {
|
|||||||
if(!castedSpell && tar->GetPet()) {
|
if(!castedSpell && tar->GetPet()) {
|
||||||
|
|
||||||
//don't cast group spells on pets
|
//don't cast group spells on pets
|
||||||
if(IsGroupSpell(selectedMercSpell.spellid)
|
if(IsGroupSpell(selectedMercSpell.spellid)
|
||||||
|| spells[selectedMercSpell.spellid].targettype == ST_Group
|
|| spells[selectedMercSpell.spellid].targettype == ST_Group
|
||||||
|| spells[selectedMercSpell.spellid].targettype == ST_GroupTeleport ) {
|
|| spells[selectedMercSpell.spellid].targettype == ST_GroupTeleport ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -5103,7 +5103,7 @@ bool Merc::Unsuspend(bool setMaxStats) {
|
|||||||
uint32 suspendedTime = 0;
|
uint32 suspendedTime = 0;
|
||||||
|
|
||||||
SetSuspended(false);
|
SetSuspended(false);
|
||||||
|
|
||||||
mercOwner->GetMercInfo().mercid = GetMercID();
|
mercOwner->GetMercInfo().mercid = GetMercID();
|
||||||
mercOwner->GetMercInfo().IsSuspended = false;
|
mercOwner->GetMercInfo().IsSuspended = false;
|
||||||
mercOwner->GetMercInfo().SuspendedTime = 0;
|
mercOwner->GetMercInfo().SuspendedTime = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user