mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 13:41:31 +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
@ -3836,7 +3836,7 @@ void Bot::AI_Process() {
|
|||||||
if(instweapon)
|
if(instweapon)
|
||||||
weapon = instweapon->GetItem();
|
weapon = instweapon->GetItem();
|
||||||
|
|
||||||
int weapontype = NULL;
|
int weapontype = 0; // No weapon type.
|
||||||
bool bIsFist = true;
|
bool bIsFist = true;
|
||||||
|
|
||||||
if(weapon) {
|
if(weapon) {
|
||||||
@ -17359,8 +17359,8 @@ bool Bot::RemoveHealRotationTarget( int index ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Bot::ClearHealRotationMembers() {
|
void Bot::ClearHealRotationMembers() {
|
||||||
_healRotationMemberPrev = NULL;
|
_healRotationMemberPrev = 0; // No previous member
|
||||||
_healRotationMemberNext = NULL;
|
_healRotationMemberNext = 0; // No next member
|
||||||
}
|
}
|
||||||
|
|
||||||
void Bot::ClearHealRotationTargets() {
|
void Bot::ClearHealRotationTargets() {
|
||||||
|
|||||||
14
zone/bot.h
14
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,
|
||||||
@ -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();
|
||||||
|
|||||||
@ -3850,7 +3850,7 @@ void Client::Handle_OP_LDoNInspect(const EQApplicationPacket *app)
|
|||||||
void Client::Handle_OP_Dye(const EQApplicationPacket *app)
|
void Client::Handle_OP_Dye(const EQApplicationPacket *app)
|
||||||
{
|
{
|
||||||
if(app->size!=sizeof(DyeStruct))
|
if(app->size!=sizeof(DyeStruct))
|
||||||
printf("Wrong size of DyeStruct, Got: %i, Expected: %i\n",app->size,sizeof(DyeStruct));
|
printf("Wrong size of DyeStruct, Got: %i, Expected: %lu\n",app->size,sizeof(DyeStruct));
|
||||||
else{
|
else{
|
||||||
DyeStruct* dye = (DyeStruct*)app->pBuffer;
|
DyeStruct* dye = (DyeStruct*)app->pBuffer;
|
||||||
DyeArmor(dye);
|
DyeArmor(dye);
|
||||||
@ -3921,7 +3921,7 @@ void Client::Handle_OP_GuildPublicNote(const EQApplicationPacket *app)
|
|||||||
|
|
||||||
if (app->size < sizeof(GuildUpdate_PublicNote)) {
|
if (app->size < sizeof(GuildUpdate_PublicNote)) {
|
||||||
// client calls for a motd on login even if they arent in a guild
|
// client calls for a motd on login even if they arent in a guild
|
||||||
printf("Error: app size of %i < size of OP_GuildPublicNote of %i\n",app->size,sizeof(GuildUpdate_PublicNote));
|
printf("Error: app size of %i < size of OP_GuildPublicNote of %lu\n",app->size,sizeof(GuildUpdate_PublicNote));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GuildUpdate_PublicNote* gpn=(GuildUpdate_PublicNote*)app->pBuffer;
|
GuildUpdate_PublicNote* gpn=(GuildUpdate_PublicNote*)app->pBuffer;
|
||||||
@ -3979,7 +3979,7 @@ void Client::Handle_OP_SetGuildMOTD(const EQApplicationPacket *app)
|
|||||||
|
|
||||||
if (app->size != sizeof(GuildMOTD_Struct)) {
|
if (app->size != sizeof(GuildMOTD_Struct)) {
|
||||||
// client calls for a motd on login even if they arent in a guild
|
// client calls for a motd on login even if they arent in a guild
|
||||||
printf("Error: app size of %i != size of GuildMOTD_Struct of %i\n",app->size,sizeof(GuildMOTD_Struct));
|
printf("Error: app size of %i != size of GuildMOTD_Struct of %lu\n",app->size,sizeof(GuildMOTD_Struct));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!IsInAGuild()) {
|
if(!IsInAGuild()) {
|
||||||
@ -6876,7 +6876,7 @@ void Client::Handle_OP_DeleteSpell(const EQApplicationPacket *app)
|
|||||||
void Client::Handle_OP_LoadSpellSet(const EQApplicationPacket *app)
|
void Client::Handle_OP_LoadSpellSet(const EQApplicationPacket *app)
|
||||||
{
|
{
|
||||||
if(app->size!=sizeof(LoadSpellSet_Struct)) {
|
if(app->size!=sizeof(LoadSpellSet_Struct)) {
|
||||||
printf("Wrong size of LoadSpellSet_Struct! Expected: %i, Got: %i\n",sizeof(LoadSpellSet_Struct),app->size);
|
printf("Wrong size of LoadSpellSet_Struct! Expected: %lu, Got: %i\n",sizeof(LoadSpellSet_Struct),app->size);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int i;
|
int i;
|
||||||
@ -6891,7 +6891,7 @@ void Client::Handle_OP_LoadSpellSet(const EQApplicationPacket *app)
|
|||||||
void Client::Handle_OP_PetitionBug(const EQApplicationPacket *app)
|
void Client::Handle_OP_PetitionBug(const EQApplicationPacket *app)
|
||||||
{
|
{
|
||||||
if(app->size!=sizeof(PetitionBug_Struct))
|
if(app->size!=sizeof(PetitionBug_Struct))
|
||||||
printf("Wrong size of BugStruct! Expected: %i, Got: %i\n",sizeof(PetitionBug_Struct),app->size);
|
printf("Wrong size of BugStruct! Expected: %lu, Got: %i\n",sizeof(PetitionBug_Struct),app->size);
|
||||||
else{
|
else{
|
||||||
Message(0, "Petition Bugs are not supported, please use /bug.");
|
Message(0, "Petition Bugs are not supported, please use /bug.");
|
||||||
}
|
}
|
||||||
@ -6901,7 +6901,7 @@ void Client::Handle_OP_PetitionBug(const EQApplicationPacket *app)
|
|||||||
void Client::Handle_OP_Bug(const EQApplicationPacket *app)
|
void Client::Handle_OP_Bug(const EQApplicationPacket *app)
|
||||||
{
|
{
|
||||||
if(app->size!=sizeof(BugStruct))
|
if(app->size!=sizeof(BugStruct))
|
||||||
printf("Wrong size of BugStruct got %d expected %d!\n", app->size, sizeof(BugStruct));
|
printf("Wrong size of BugStruct got %d expected %lu!\n", app->size, sizeof(BugStruct));
|
||||||
else{
|
else{
|
||||||
BugStruct* bug=(BugStruct*)app->pBuffer;
|
BugStruct* bug=(BugStruct*)app->pBuffer;
|
||||||
database.UpdateBug(bug);
|
database.UpdateBug(bug);
|
||||||
@ -8306,7 +8306,7 @@ void Client::Handle_OP_OpenTributeMaster(const EQApplicationPacket *app)
|
|||||||
_pkt(TRIBUTE__IN, app);
|
_pkt(TRIBUTE__IN, app);
|
||||||
|
|
||||||
if(app->size != sizeof(StartTribute_Struct))
|
if(app->size != sizeof(StartTribute_Struct))
|
||||||
printf("Error in OP_OpenTributeMaster. Expected size of: %i, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
printf("Error in OP_OpenTributeMaster. Expected size of: %lu, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
||||||
else {
|
else {
|
||||||
//Opens the tribute master window
|
//Opens the tribute master window
|
||||||
StartTribute_Struct* st = (StartTribute_Struct*)app->pBuffer;
|
StartTribute_Struct* st = (StartTribute_Struct*)app->pBuffer;
|
||||||
@ -8331,7 +8331,7 @@ void Client::Handle_OP_OpenGuildTributeMaster(const EQApplicationPacket *app)
|
|||||||
_pkt(TRIBUTE__IN, app);
|
_pkt(TRIBUTE__IN, app);
|
||||||
|
|
||||||
if(app->size != sizeof(StartTribute_Struct))
|
if(app->size != sizeof(StartTribute_Struct))
|
||||||
printf("Error in OP_OpenGuildTributeMaster. Expected size of: %i, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
printf("Error in OP_OpenGuildTributeMaster. Expected size of: %lu, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
||||||
else {
|
else {
|
||||||
//Opens the guild tribute master window
|
//Opens the guild tribute master window
|
||||||
StartTribute_Struct* st = (StartTribute_Struct*)app->pBuffer;
|
StartTribute_Struct* st = (StartTribute_Struct*)app->pBuffer;
|
||||||
@ -8357,7 +8357,7 @@ void Client::Handle_OP_TributeItem(const EQApplicationPacket *app)
|
|||||||
|
|
||||||
//player donates an item...
|
//player donates an item...
|
||||||
if(app->size != sizeof(TributeItem_Struct))
|
if(app->size != sizeof(TributeItem_Struct))
|
||||||
printf("Error in OP_TributeItem. Expected size of: %i, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
printf("Error in OP_TributeItem. Expected size of: %lu, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
||||||
else {
|
else {
|
||||||
TributeItem_Struct* t = (TributeItem_Struct*)app->pBuffer;
|
TributeItem_Struct* t = (TributeItem_Struct*)app->pBuffer;
|
||||||
|
|
||||||
@ -8386,7 +8386,7 @@ void Client::Handle_OP_TributeMoney(const EQApplicationPacket *app)
|
|||||||
|
|
||||||
//player donates money
|
//player donates money
|
||||||
if(app->size != sizeof(TributeMoney_Struct))
|
if(app->size != sizeof(TributeMoney_Struct))
|
||||||
printf("Error in OP_TributeMoney. Expected size of: %i, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
printf("Error in OP_TributeMoney. Expected size of: %lu, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
||||||
else {
|
else {
|
||||||
TributeMoney_Struct* t = (TributeMoney_Struct*)app->pBuffer;
|
TributeMoney_Struct* t = (TributeMoney_Struct*)app->pBuffer;
|
||||||
|
|
||||||
@ -8534,7 +8534,7 @@ void Client::Handle_OP_Ignore(const EQApplicationPacket *app)
|
|||||||
void Client::Handle_OP_FindPersonRequest(const EQApplicationPacket *app)
|
void Client::Handle_OP_FindPersonRequest(const EQApplicationPacket *app)
|
||||||
{
|
{
|
||||||
if(app->size != sizeof(FindPersonRequest_Struct))
|
if(app->size != sizeof(FindPersonRequest_Struct))
|
||||||
printf("Error in FindPersonRequest_Struct. Expected size of: %i, but got: %i\n",sizeof(FindPersonRequest_Struct),app->size);
|
printf("Error in FindPersonRequest_Struct. Expected size of: %lu, but got: %i\n",sizeof(FindPersonRequest_Struct),app->size);
|
||||||
else {
|
else {
|
||||||
FindPersonRequest_Struct* t = (FindPersonRequest_Struct*)app->pBuffer;
|
FindPersonRequest_Struct* t = (FindPersonRequest_Struct*)app->pBuffer;
|
||||||
|
|
||||||
|
|||||||
@ -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))) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user