mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 23:01:30 +00:00
Fix several GCC warnings
This commit is contained in:
parent
f51f6e00c4
commit
d6ff01d63c
@ -1356,6 +1356,9 @@ void EQStream::CheckTimeout(uint32 now, uint32 timeout) {
|
|||||||
_log(NET__DEBUG, _L "Timeout expired in established state. Closing connection." __L);
|
_log(NET__DEBUG, _L "Timeout expired in established state. Closing connection." __L);
|
||||||
_SendDisconnect();
|
_SendDisconnect();
|
||||||
SetState(DISCONNECTING);
|
SetState(DISCONNECTING);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
//
|
//
|
||||||
#define VARSTRUCT_DECODE_TYPE(Type, Buffer) *(Type *)Buffer; Buffer += sizeof(Type);
|
#define VARSTRUCT_DECODE_TYPE(Type, Buffer) *(Type *)Buffer; Buffer += sizeof(Type);
|
||||||
#define VARSTRUCT_DECODE_STRING(String, Buffer) strcpy(String, Buffer); Buffer += strlen(String)+1;
|
#define VARSTRUCT_DECODE_STRING(String, Buffer) strcpy(String, Buffer); Buffer += strlen(String)+1;
|
||||||
#define VARSTRUCT_ENCODE_STRING(Buffer, String) { sprintf(Buffer, String); Buffer += strlen(String) + 1; }
|
#define VARSTRUCT_ENCODE_STRING(Buffer, String) { sprintf(Buffer, "%s", String); Buffer += strlen(String) + 1; }
|
||||||
#define VARSTRUCT_ENCODE_INTSTRING(Buffer, Number) { sprintf(Buffer, "%i", Number); Buffer += strlen(Buffer) + 1; }
|
#define VARSTRUCT_ENCODE_INTSTRING(Buffer, Number) { sprintf(Buffer, "%i", Number); Buffer += strlen(Buffer) + 1; }
|
||||||
#define VARSTRUCT_ENCODE_TYPE(Type, Buffer, Value) { *(Type *)Buffer = Value; Buffer += sizeof(Type); }
|
#define VARSTRUCT_ENCODE_TYPE(Type, Buffer, Value) { *(Type *)Buffer = Value; Buffer += sizeof(Type); }
|
||||||
#define VARSTRUCT_SKIP_TYPE(Type, Buffer) Buffer += sizeof(Type);
|
#define VARSTRUCT_SKIP_TYPE(Type, Buffer) Buffer += sizeof(Type);
|
||||||
|
|||||||
@ -95,11 +95,11 @@ namespace EQEmu
|
|||||||
*/
|
*/
|
||||||
const char* what() const throw() { return full_description().c_str(); }
|
const char* what() const throw() { return full_description().c_str(); }
|
||||||
protected:
|
protected:
|
||||||
std::string name_; //!< Exception name
|
|
||||||
std::string desc_; //!< Exception Description
|
|
||||||
mutable std::string full_desc_; //!< Full Exception Description
|
mutable std::string full_desc_; //!< Full Exception Description
|
||||||
std::string file_; //!< File Name
|
|
||||||
long line_; //<! File Line
|
long line_; //<! File Line
|
||||||
|
std::string file_; //!< File Name
|
||||||
|
std::string desc_; //!< Exception Description
|
||||||
|
std::string name_; //!< Exception name
|
||||||
};
|
};
|
||||||
} // EQEmu
|
} // EQEmu
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,7 @@ RDTSC_Timer::RDTSC_Timer(bool start_it) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int64 RDTSC_Timer::rdtsc() {
|
int64 RDTSC_Timer::rdtsc() {
|
||||||
int64 res;
|
int64 res = 0;
|
||||||
#ifdef USE_RDTSC
|
#ifdef USE_RDTSC
|
||||||
#ifndef WIN64
|
#ifndef WIN64
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|||||||
@ -1120,7 +1120,7 @@ struct QSPlayerLogTrade_Struct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct QSHandinItems_Struct {
|
struct QSHandinItems_Struct {
|
||||||
char action_type[6]; // handin, return or reward
|
char action_type[7]; // handin, return or reward
|
||||||
uint16 char_slot;
|
uint16 char_slot;
|
||||||
uint32 item_id;
|
uint32 item_id;
|
||||||
uint16 charges;
|
uint16 charges;
|
||||||
|
|||||||
@ -21,13 +21,13 @@ using namespace std;
|
|||||||
|
|
||||||
SharedDatabase::SharedDatabase()
|
SharedDatabase::SharedDatabase()
|
||||||
: Database(), skill_caps_mmf(nullptr), items_mmf(nullptr), items_hash(nullptr), faction_mmf(nullptr), faction_hash(nullptr),
|
: Database(), skill_caps_mmf(nullptr), items_mmf(nullptr), items_hash(nullptr), faction_mmf(nullptr), faction_hash(nullptr),
|
||||||
loot_table_mmf(nullptr), loot_drop_mmf(nullptr), loot_table_hash(nullptr), loot_drop_hash(nullptr)
|
loot_table_mmf(nullptr), loot_table_hash(nullptr), loot_drop_mmf(nullptr), loot_drop_hash(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
SharedDatabase::SharedDatabase(const char* host, const char* user, const char* passwd, const char* database, uint32 port)
|
SharedDatabase::SharedDatabase(const char* host, const char* user, const char* passwd, const char* database, uint32 port)
|
||||||
: Database(host, user, passwd, database, port), skill_caps_mmf(nullptr), items_mmf(nullptr), items_hash(nullptr),
|
: Database(host, user, passwd, database, port), skill_caps_mmf(nullptr), items_mmf(nullptr), items_hash(nullptr),
|
||||||
faction_mmf(nullptr), faction_hash(nullptr), loot_table_mmf(nullptr), loot_drop_mmf(nullptr), loot_table_hash(nullptr),
|
faction_mmf(nullptr), faction_hash(nullptr), loot_table_mmf(nullptr), loot_table_hash(nullptr), loot_drop_mmf(nullptr),
|
||||||
loot_drop_hash(nullptr)
|
loot_drop_hash(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@ -112,6 +112,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
EQEmu::MemoryMappedFile *skill_caps_mmf;
|
||||||
EQEmu::MemoryMappedFile *items_mmf;
|
EQEmu::MemoryMappedFile *items_mmf;
|
||||||
EQEmu::FixedMemoryHashSet<Item_Struct> *items_hash;
|
EQEmu::FixedMemoryHashSet<Item_Struct> *items_hash;
|
||||||
EQEmu::MemoryMappedFile *faction_mmf;
|
EQEmu::MemoryMappedFile *faction_mmf;
|
||||||
@ -120,7 +121,6 @@ protected:
|
|||||||
EQEmu::FixedMemoryVariableHashSet<LootTable_Struct> *loot_table_hash;
|
EQEmu::FixedMemoryVariableHashSet<LootTable_Struct> *loot_table_hash;
|
||||||
EQEmu::MemoryMappedFile *loot_drop_mmf;
|
EQEmu::MemoryMappedFile *loot_drop_mmf;
|
||||||
EQEmu::FixedMemoryVariableHashSet<LootDrop_Struct> *loot_drop_hash;
|
EQEmu::FixedMemoryVariableHashSet<LootDrop_Struct> *loot_drop_hash;
|
||||||
EQEmu::MemoryMappedFile *skill_caps_mmf;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /*SHAREDDB_H_*/
|
#endif /*SHAREDDB_H_*/
|
||||||
|
|||||||
@ -353,9 +353,6 @@ static void ProcessMailTo(Client *c, string MailMessage) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ProcessMailTo(Client *c, string from, string subject, string message) {
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ProcessSetMessageStatus(string SetMessageCommand) {
|
static void ProcessSetMessageStatus(string SetMessageCommand) {
|
||||||
|
|
||||||
int MessageNumber;
|
int MessageNumber;
|
||||||
@ -1332,6 +1329,7 @@ void Client::SendChannelMessage(string Message)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(RequiredChannel)
|
if(RequiredChannel)
|
||||||
|
{
|
||||||
if(RuleB(Chat, EnableAntiSpam))
|
if(RuleB(Chat, EnableAntiSpam))
|
||||||
{
|
{
|
||||||
if(!RequiredChannel->IsModerated() || RequiredChannel->HasVoice(GetName()) || RequiredChannel->IsOwner(GetName()) ||
|
if(!RequiredChannel->IsModerated() || RequiredChannel->HasVoice(GetName()) || RequiredChannel->IsOwner(GetName()) ||
|
||||||
@ -1386,6 +1384,7 @@ void Client::SendChannelMessage(string Message)
|
|||||||
else
|
else
|
||||||
GeneralChannelMessage("Channel " + ChannelName + " is moderated and you have not been granted a voice.");
|
GeneralChannelMessage("Channel " + ChannelName + " is moderated and you have not been granted a voice.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1885,11 +1884,12 @@ void Client::ChannelModerate(string CommandString) {
|
|||||||
|
|
||||||
RequiredChannel->SetModerated(!RequiredChannel->IsModerated());
|
RequiredChannel->SetModerated(!RequiredChannel->IsModerated());
|
||||||
|
|
||||||
if(!RequiredChannel->IsClientInChannel(this))
|
if(!RequiredChannel->IsClientInChannel(this)) {
|
||||||
if(RequiredChannel->IsModerated())
|
if(RequiredChannel->IsModerated())
|
||||||
GeneralChannelMessage("Channel " + ChannelName + " is now moderated.");
|
GeneralChannelMessage("Channel " + ChannelName + " is now moderated.");
|
||||||
else
|
else
|
||||||
GeneralChannelMessage("Channel " + ChannelName + " is no longer moderated.");
|
GeneralChannelMessage("Channel " + ChannelName + " is no longer moderated.");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1279,8 +1279,8 @@ void AdventureManager::DoLeaderboardRequestWins(const char* player)
|
|||||||
strcpy((char*)pack->pBuffer, player);
|
strcpy((char*)pack->pBuffer, player);
|
||||||
|
|
||||||
int place = -1;
|
int place = -1;
|
||||||
int our_successes;
|
int our_successes = 0;
|
||||||
int our_failures;
|
int our_failures = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
list<LeaderboardInfo>::iterator iter = leaderboard_info_wins.begin();
|
list<LeaderboardInfo>::iterator iter = leaderboard_info_wins.begin();
|
||||||
while(i < 100 && iter != leaderboard_info_wins.end())
|
while(i < 100 && iter != leaderboard_info_wins.end())
|
||||||
@ -1346,8 +1346,8 @@ void AdventureManager::DoLeaderboardRequestPercentage(const char* player)
|
|||||||
strcpy((char*)pack->pBuffer, player);
|
strcpy((char*)pack->pBuffer, player);
|
||||||
|
|
||||||
int place = -1;
|
int place = -1;
|
||||||
int our_successes;
|
int our_successes = 0;
|
||||||
int our_failures;
|
int our_failures = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
list<LeaderboardInfo>::iterator iter = leaderboard_info_percentage.begin();
|
list<LeaderboardInfo>::iterator iter = leaderboard_info_percentage.begin();
|
||||||
while(i < 100 && iter != leaderboard_info_percentage.end())
|
while(i < 100 && iter != leaderboard_info_percentage.end())
|
||||||
@ -1413,8 +1413,8 @@ void AdventureManager::DoLeaderboardRequestWinsGuk(const char* player)
|
|||||||
strcpy((char*)pack->pBuffer, player);
|
strcpy((char*)pack->pBuffer, player);
|
||||||
|
|
||||||
int place = -1;
|
int place = -1;
|
||||||
int our_successes;
|
int our_successes = 0;
|
||||||
int our_failures;
|
int our_failures = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
list<LeaderboardInfo>::iterator iter = leaderboard_info_wins_guk.begin();
|
list<LeaderboardInfo>::iterator iter = leaderboard_info_wins_guk.begin();
|
||||||
while(i < 100 && iter != leaderboard_info_wins_guk.end())
|
while(i < 100 && iter != leaderboard_info_wins_guk.end())
|
||||||
@ -1480,8 +1480,8 @@ void AdventureManager::DoLeaderboardRequestPercentageGuk(const char* player)
|
|||||||
strcpy((char*)pack->pBuffer, player);
|
strcpy((char*)pack->pBuffer, player);
|
||||||
|
|
||||||
int place = -1;
|
int place = -1;
|
||||||
int our_successes;
|
int our_successes = 0;
|
||||||
int our_failures;
|
int our_failures = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
list<LeaderboardInfo>::iterator iter = leaderboard_info_percentage_guk.begin();
|
list<LeaderboardInfo>::iterator iter = leaderboard_info_percentage_guk.begin();
|
||||||
while(i < 100 && iter != leaderboard_info_percentage_guk.end())
|
while(i < 100 && iter != leaderboard_info_percentage_guk.end())
|
||||||
@ -1547,8 +1547,8 @@ void AdventureManager::DoLeaderboardRequestWinsMir(const char* player)
|
|||||||
strcpy((char*)pack->pBuffer, player);
|
strcpy((char*)pack->pBuffer, player);
|
||||||
|
|
||||||
int place = -1;
|
int place = -1;
|
||||||
int our_successes;
|
int our_successes = 0;
|
||||||
int our_failures;
|
int our_failures = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
list<LeaderboardInfo>::iterator iter = leaderboard_info_wins_mir.begin();
|
list<LeaderboardInfo>::iterator iter = leaderboard_info_wins_mir.begin();
|
||||||
while(i < 100 && iter != leaderboard_info_wins_mir.end())
|
while(i < 100 && iter != leaderboard_info_wins_mir.end())
|
||||||
@ -1614,8 +1614,8 @@ void AdventureManager::DoLeaderboardRequestPercentageMir(const char* player)
|
|||||||
strcpy((char*)pack->pBuffer, player);
|
strcpy((char*)pack->pBuffer, player);
|
||||||
|
|
||||||
int place = -1;
|
int place = -1;
|
||||||
int our_successes;
|
int our_successes = 0;
|
||||||
int our_failures;
|
int our_failures = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
list<LeaderboardInfo>::iterator iter = leaderboard_info_percentage_mir.begin();
|
list<LeaderboardInfo>::iterator iter = leaderboard_info_percentage_mir.begin();
|
||||||
while(i < 100 && iter != leaderboard_info_percentage_mir.end())
|
while(i < 100 && iter != leaderboard_info_percentage_mir.end())
|
||||||
@ -1681,8 +1681,8 @@ void AdventureManager::DoLeaderboardRequestWinsMmc(const char* player)
|
|||||||
strcpy((char*)pack->pBuffer, player);
|
strcpy((char*)pack->pBuffer, player);
|
||||||
|
|
||||||
int place = -1;
|
int place = -1;
|
||||||
int our_successes;
|
int our_successes = 0;
|
||||||
int our_failures;
|
int our_failures = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
list<LeaderboardInfo>::iterator iter = leaderboard_info_wins_mmc.begin();
|
list<LeaderboardInfo>::iterator iter = leaderboard_info_wins_mmc.begin();
|
||||||
while(i < 100 && iter != leaderboard_info_wins_mmc.end())
|
while(i < 100 && iter != leaderboard_info_wins_mmc.end())
|
||||||
@ -1748,8 +1748,8 @@ void AdventureManager::DoLeaderboardRequestPercentageMmc(const char* player)
|
|||||||
strcpy((char*)pack->pBuffer, player);
|
strcpy((char*)pack->pBuffer, player);
|
||||||
|
|
||||||
int place = -1;
|
int place = -1;
|
||||||
int our_successes;
|
int our_successes = 0;
|
||||||
int our_failures;
|
int our_failures = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
list<LeaderboardInfo>::iterator iter = leaderboard_info_percentage_mmc.begin();
|
list<LeaderboardInfo>::iterator iter = leaderboard_info_percentage_mmc.begin();
|
||||||
while(i < 100 && iter != leaderboard_info_percentage_mmc.end())
|
while(i < 100 && iter != leaderboard_info_percentage_mmc.end())
|
||||||
@ -1815,8 +1815,8 @@ void AdventureManager::DoLeaderboardRequestWinsRuj(const char* player)
|
|||||||
strcpy((char*)pack->pBuffer, player);
|
strcpy((char*)pack->pBuffer, player);
|
||||||
|
|
||||||
int place = -1;
|
int place = -1;
|
||||||
int our_successes;
|
int our_successes = 0;
|
||||||
int our_failures;
|
int our_failures = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
list<LeaderboardInfo>::iterator iter = leaderboard_info_wins_ruj.begin();
|
list<LeaderboardInfo>::iterator iter = leaderboard_info_wins_ruj.begin();
|
||||||
while(i < 100 && iter != leaderboard_info_wins_ruj.end())
|
while(i < 100 && iter != leaderboard_info_wins_ruj.end())
|
||||||
@ -1882,8 +1882,8 @@ void AdventureManager::DoLeaderboardRequestPercentageRuj(const char* player)
|
|||||||
strcpy((char*)pack->pBuffer, player);
|
strcpy((char*)pack->pBuffer, player);
|
||||||
|
|
||||||
int place = -1;
|
int place = -1;
|
||||||
int our_successes;
|
int our_successes = 0;
|
||||||
int our_failures;
|
int our_failures = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
list<LeaderboardInfo>::iterator iter = leaderboard_info_percentage_ruj.begin();
|
list<LeaderboardInfo>::iterator iter = leaderboard_info_percentage_ruj.begin();
|
||||||
while(i < 100 && iter != leaderboard_info_percentage_ruj.end())
|
while(i < 100 && iter != leaderboard_info_percentage_ruj.end())
|
||||||
@ -1949,8 +1949,8 @@ void AdventureManager::DoLeaderboardRequestWinsTak(const char* player)
|
|||||||
strcpy((char*)pack->pBuffer, player);
|
strcpy((char*)pack->pBuffer, player);
|
||||||
|
|
||||||
int place = -1;
|
int place = -1;
|
||||||
int our_successes;
|
int our_successes = 0;
|
||||||
int our_failures;
|
int our_failures = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
list<LeaderboardInfo>::iterator iter = leaderboard_info_wins_ruj.begin();
|
list<LeaderboardInfo>::iterator iter = leaderboard_info_wins_ruj.begin();
|
||||||
while(i < 100 && iter != leaderboard_info_wins_ruj.end())
|
while(i < 100 && iter != leaderboard_info_wins_ruj.end())
|
||||||
@ -2016,8 +2016,8 @@ void AdventureManager::DoLeaderboardRequestPercentageTak(const char* player)
|
|||||||
strcpy((char*)pack->pBuffer, player);
|
strcpy((char*)pack->pBuffer, player);
|
||||||
|
|
||||||
int place = -1;
|
int place = -1;
|
||||||
int our_successes;
|
int our_successes = 0;
|
||||||
int our_failures;
|
int our_failures = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
list<LeaderboardInfo>::iterator iter = leaderboard_info_percentage_tak.begin();
|
list<LeaderboardInfo>::iterator iter = leaderboard_info_percentage_tak.begin();
|
||||||
while(i < 100 && iter != leaderboard_info_percentage_tak.end())
|
while(i < 100 && iter != leaderboard_info_percentage_tak.end())
|
||||||
|
|||||||
@ -257,7 +257,7 @@ void Client::SendMembershipSettings() {
|
|||||||
Membership_Details_Struct* mds = (Membership_Details_Struct*)outapp->pBuffer;
|
Membership_Details_Struct* mds = (Membership_Details_Struct*)outapp->pBuffer;
|
||||||
|
|
||||||
mds->membership_setting_count = 66;
|
mds->membership_setting_count = 66;
|
||||||
uint32 gold_settings[22] = {-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,0};
|
int32 gold_settings[22] = {-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,-1,-1,0};
|
||||||
uint32 entry_count = 0;
|
uint32 entry_count = 0;
|
||||||
for (int setting_id=0; setting_id < 22; setting_id++)
|
for (int setting_id=0; setting_id < 22; setting_id++)
|
||||||
{
|
{
|
||||||
@ -1583,7 +1583,7 @@ bool CheckCharCreateInfoSoF(CharCreate_Struct *cc)
|
|||||||
|
|
||||||
uint32 max_stats = 0;
|
uint32 max_stats = 0;
|
||||||
uint32 allocs = character_create_allocations.size();
|
uint32 allocs = character_create_allocations.size();
|
||||||
RaceClassAllocation allocation;
|
RaceClassAllocation allocation = {0};
|
||||||
found = false;
|
found = false;
|
||||||
for(int i = 0; i < combos; ++i) {
|
for(int i = 0; i < combos; ++i) {
|
||||||
if(character_create_allocations[i].Index == class_combo.AllocationIndex) {
|
if(character_create_allocations[i].Index == class_combo.AllocationIndex) {
|
||||||
|
|||||||
@ -1425,7 +1425,7 @@ void Client::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_
|
|||||||
if(dead)
|
if(dead)
|
||||||
return; //cant die more than once...
|
return; //cant die more than once...
|
||||||
|
|
||||||
int exploss;
|
int exploss = 0;
|
||||||
|
|
||||||
mlog(COMBAT__HITS, "Fatal blow dealt by %s with %d damage, spell %d, skill %d", killerMob ? killerMob->GetName() : "Unknown", damage, spell, attack_skill);
|
mlog(COMBAT__HITS, "Fatal blow dealt by %s with %d damage, spell %d, skill %d", killerMob ? killerMob->GetName() : "Unknown", damage, spell, attack_skill);
|
||||||
|
|
||||||
|
|||||||
@ -7383,10 +7383,12 @@ FACTION_VALUE Client::GetFactionLevel(uint32 char_id, uint32 npc_id, uint32 p_ra
|
|||||||
if (IsInvisible(tnpc))
|
if (IsInvisible(tnpc))
|
||||||
return FACTION_INDIFFERENT;
|
return FACTION_INDIFFERENT;
|
||||||
if (tnpc && tnpc->GetOwnerID() != 0) // pets con amiably to owner and indiff to rest
|
if (tnpc && tnpc->GetOwnerID() != 0) // pets con amiably to owner and indiff to rest
|
||||||
|
{
|
||||||
if (char_id == tnpc->GetOwner()->CastToClient()->CharacterID())
|
if (char_id == tnpc->GetOwner()->CastToClient()->CharacterID())
|
||||||
return FACTION_AMIABLE;
|
return FACTION_AMIABLE;
|
||||||
else
|
else
|
||||||
return FACTION_INDIFFERENT;
|
return FACTION_INDIFFERENT;
|
||||||
|
}
|
||||||
|
|
||||||
//First get the NPC's Primary faction
|
//First get the NPC's Primary faction
|
||||||
if(pFaction > 0)
|
if(pFaction > 0)
|
||||||
|
|||||||
@ -128,7 +128,7 @@ void ClientLogs::EQEmuIO_pva(EQEMuLog::LogIDs id, const char *prefix, const char
|
|||||||
if(fmt[0] == '\n' || fmt[0] == '\r')
|
if(fmt[0] == '\n' || fmt[0] == '\r')
|
||||||
return; //skip new lines...
|
return; //skip new lines...
|
||||||
char *buf = _buffer;
|
char *buf = _buffer;
|
||||||
int plen = snprintf(buf, MAX_CLIENT_LOG_MESSAGE_LENGTH, prefix);
|
int plen = snprintf(buf, MAX_CLIENT_LOG_MESSAGE_LENGTH, "%s", prefix);
|
||||||
buf += plen;
|
buf += plen;
|
||||||
vsnprintf(buf, MAX_CLIENT_LOG_MESSAGE_LENGTH-plen, fmt, ap);
|
vsnprintf(buf, MAX_CLIENT_LOG_MESSAGE_LENGTH-plen, fmt, ap);
|
||||||
_buffer[MAX_CLIENT_LOG_MESSAGE_LENGTH] = '\0';
|
_buffer[MAX_CLIENT_LOG_MESSAGE_LENGTH] = '\0';
|
||||||
|
|||||||
@ -3905,7 +3905,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: %lu\n",app->size,sizeof(DyeStruct));
|
printf("Wrong size of DyeStruct, Got: %i, Expected: %i\n",app->size,sizeof(DyeStruct));
|
||||||
else{
|
else{
|
||||||
DyeStruct* dye = (DyeStruct*)app->pBuffer;
|
DyeStruct* dye = (DyeStruct*)app->pBuffer;
|
||||||
DyeArmor(dye);
|
DyeArmor(dye);
|
||||||
@ -3976,7 +3976,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 %lu\n",app->size,sizeof(GuildUpdate_PublicNote));
|
printf("Error: app size of %i < size of OP_GuildPublicNote of %i\n",app->size,sizeof(GuildUpdate_PublicNote));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GuildUpdate_PublicNote* gpn=(GuildUpdate_PublicNote*)app->pBuffer;
|
GuildUpdate_PublicNote* gpn=(GuildUpdate_PublicNote*)app->pBuffer;
|
||||||
@ -4034,7 +4034,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 %lu\n",app->size,sizeof(GuildMOTD_Struct));
|
printf("Error: app size of %i != size of GuildMOTD_Struct of %i\n",app->size,sizeof(GuildMOTD_Struct));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!IsInAGuild()) {
|
if(!IsInAGuild()) {
|
||||||
@ -5013,7 +5013,7 @@ void Client::Handle_OP_TradeAcceptClick(const EQApplicationPacket *app)
|
|||||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_FinishTrade, 0);
|
EQApplicationPacket* outapp = new EQApplicationPacket(OP_FinishTrade, 0);
|
||||||
QueuePacket(outapp);
|
QueuePacket(outapp);
|
||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
if(with->IsNPC())
|
if(with->IsNPC()) {
|
||||||
// Audit trade to database for player trade stream
|
// Audit trade to database for player trade stream
|
||||||
if(RuleB(QueryServ, PlayerLogHandins)) {
|
if(RuleB(QueryServ, PlayerLogHandins)) {
|
||||||
uint16 handin_count = 0;
|
uint16 handin_count = 0;
|
||||||
@ -5033,6 +5033,7 @@ void Client::Handle_OP_TradeAcceptClick(const EQApplicationPacket *app)
|
|||||||
else {
|
else {
|
||||||
FinishTrade(with->CastToNPC());
|
FinishTrade(with->CastToNPC());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
else if(with->IsBot())
|
else if(with->IsBot())
|
||||||
with->CastToBot()->FinishTrade(this, Bot::BotTradeClientNormal);
|
with->CastToBot()->FinishTrade(this, Bot::BotTradeClientNormal);
|
||||||
@ -6941,7 +6942,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: %lu, Got: %i\n",sizeof(LoadSpellSet_Struct),app->size);
|
printf("Wrong size of LoadSpellSet_Struct! Expected: %i, Got: %i\n",sizeof(LoadSpellSet_Struct),app->size);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int i;
|
int i;
|
||||||
@ -6956,7 +6957,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: %lu, Got: %i\n",sizeof(PetitionBug_Struct),app->size);
|
printf("Wrong size of BugStruct! Expected: %i, 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.");
|
||||||
}
|
}
|
||||||
@ -6966,7 +6967,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 %lu!\n", app->size, sizeof(BugStruct));
|
printf("Wrong size of BugStruct got %d expected %i!\n", app->size, sizeof(BugStruct));
|
||||||
else{
|
else{
|
||||||
BugStruct* bug=(BugStruct*)app->pBuffer;
|
BugStruct* bug=(BugStruct*)app->pBuffer;
|
||||||
database.UpdateBug(bug);
|
database.UpdateBug(bug);
|
||||||
@ -8362,7 +8363,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: %lu, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
printf("Error in OP_OpenTributeMaster. Expected size of: %i, 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;
|
||||||
@ -8387,7 +8388,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: %lu, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
printf("Error in OP_OpenGuildTributeMaster. Expected size of: %i, 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;
|
||||||
@ -8413,7 +8414,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: %lu, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
printf("Error in OP_TributeItem. Expected size of: %i, 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;
|
||||||
|
|
||||||
@ -8442,7 +8443,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: %lu, but got: %i\n",sizeof(StartTribute_Struct),app->size);
|
printf("Error in OP_TributeMoney. Expected size of: %i, 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;
|
||||||
|
|
||||||
@ -8590,7 +8591,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: %lu, but got: %i\n",sizeof(FindPersonRequest_Struct),app->size);
|
printf("Error in FindPersonRequest_Struct. Expected size of: %i, 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;
|
||||||
|
|
||||||
|
|||||||
@ -1759,10 +1759,12 @@ void command_timezone(Client *c, const Seperator *sep)
|
|||||||
c->Message(13, "Current timezone is: %ih %im", zone->zone_time.getEQTimeZoneHr(), zone->zone_time.getEQTimeZoneMin());
|
c->Message(13, "Current timezone is: %ih %im", zone->zone_time.getEQTimeZoneHr(), zone->zone_time.getEQTimeZoneMin());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(sep->arg[2]=="")
|
uint8 hours = atoi(sep->arg[1]);
|
||||||
strcpy(sep->arg[2], "0");
|
uint8 minutes = atoi(sep->arg[2]);
|
||||||
c->Message(13, "Setting timezone to %s h %s m", sep->arg[1], sep->arg[2]);
|
if(!sep->IsNumber(2))
|
||||||
uint32 ntz=(atoi(sep->arg[1])*60)+atoi(sep->arg[2]);
|
minutes = 0;
|
||||||
|
c->Message(13, "Setting timezone to %i h %i m", hours, minutes);
|
||||||
|
uint32 ntz=(hours*60)+minutes;
|
||||||
zone->zone_time.setEQTimeZone(ntz);
|
zone->zone_time.setEQTimeZone(ntz);
|
||||||
database.SetZoneTZ(zone->GetZoneID(), zone->GetInstanceVersion(), ntz);
|
database.SetZoneTZ(zone->GetZoneID(), zone->GetInstanceVersion(), ntz);
|
||||||
|
|
||||||
@ -3897,7 +3899,7 @@ void command_fixmob(Client *c, const Seperator *sep)
|
|||||||
{
|
{
|
||||||
|
|
||||||
uint32 Adjustment = 1; // Previous or Next
|
uint32 Adjustment = 1; // Previous or Next
|
||||||
char codeMove;
|
char codeMove = 0;
|
||||||
|
|
||||||
if (sep->arg[2])
|
if (sep->arg[2])
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1464,7 +1464,7 @@ bool PerlembParser::PlayerHasQuestSub(const char *subname) {
|
|||||||
if(playerQuestLoaded.count(zone->GetShortName()) == 0)
|
if(playerQuestLoaded.count(zone->GetShortName()) == 0)
|
||||||
LoadPlayerScript(zone->GetShortName());
|
LoadPlayerScript(zone->GetShortName());
|
||||||
|
|
||||||
if(subname == "EVENT_CAST")
|
if(strcmp("EVENT_CAST",subname) == 0)
|
||||||
return (playerQuestLoaded[zone->GetShortName()] == pQuestEventCast);
|
return (playerQuestLoaded[zone->GetShortName()] == pQuestEventCast);
|
||||||
|
|
||||||
return(perl->SubExists(packagename.c_str(), subname));
|
return(perl->SubExists(packagename.c_str(), subname));
|
||||||
@ -1477,7 +1477,7 @@ bool PerlembParser::GlobalPlayerHasQuestSub(const char *subname) {
|
|||||||
if(globalPlayerQuestLoaded == pQuestReadyToLoad)
|
if(globalPlayerQuestLoaded == pQuestReadyToLoad)
|
||||||
LoadGlobalPlayerScript();
|
LoadGlobalPlayerScript();
|
||||||
|
|
||||||
if(subname == "EVENT_CAST")
|
if(strcmp("EVENT_CAST",subname) == 0)
|
||||||
return (globalPlayerQuestLoaded == pQuestEventCast);
|
return (globalPlayerQuestLoaded == pQuestEventCast);
|
||||||
|
|
||||||
return(perl->SubExists(packagename.c_str(), subname));
|
return(perl->SubExists(packagename.c_str(), subname));
|
||||||
|
|||||||
@ -1493,11 +1493,13 @@ void EntityList::RemoveFromTargets(Mob* mob, bool RemoveFromXTargets)
|
|||||||
m->RemoveFromHateList(mob);
|
m->RemoveFromHateList(mob);
|
||||||
|
|
||||||
if(RemoveFromXTargets)
|
if(RemoveFromXTargets)
|
||||||
|
{
|
||||||
if(m->IsClient())
|
if(m->IsClient())
|
||||||
m->CastToClient()->RemoveXTarget(mob, false);
|
m->CastToClient()->RemoveXTarget(mob, false);
|
||||||
// FadingMemories calls this function passing the client.
|
// FadingMemories calls this function passing the client.
|
||||||
else if(mob->IsClient())
|
else if(mob->IsClient())
|
||||||
mob->CastToClient()->RemoveXTarget(m, false);
|
mob->CastToClient()->RemoveXTarget(m, false);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5062,7 +5062,7 @@ Merc* Merc::LoadMerc(Client *c, MercTemplate* merc_template, uint32 merchant_id,
|
|||||||
snprintf(c->GetEPP().merc_name, 64, "%s", c->GetMercInfo().merc_name);
|
snprintf(c->GetEPP().merc_name, 64, "%s", c->GetMercInfo().merc_name);
|
||||||
snprintf(npc_type->name, 64, "%s", c->GetMercInfo().merc_name);
|
snprintf(npc_type->name, 64, "%s", c->GetMercInfo().merc_name);
|
||||||
}
|
}
|
||||||
uint8 gender;
|
uint8 gender = 0;
|
||||||
if(merchant_id > 0) {
|
if(merchant_id > 0) {
|
||||||
NPC* tar = entity_list.GetNPCByID(merchant_id);
|
NPC* tar = entity_list.GetNPCByID(merchant_id);
|
||||||
if(tar) {
|
if(tar) {
|
||||||
@ -5586,7 +5586,7 @@ bool Merc::Suspend() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Merc::Unsuspend(bool setMaxStats) {
|
bool Merc::Unsuspend(bool setMaxStats) {
|
||||||
Client* mercOwner;
|
Client* mercOwner = nullptr;
|
||||||
bool loaded = false;
|
bool loaded = false;
|
||||||
|
|
||||||
if(GetMercOwner()) {
|
if(GetMercOwner()) {
|
||||||
|
|||||||
@ -91,13 +91,13 @@ Mob::Mob(const char* in_name,
|
|||||||
mana_timer(2000),
|
mana_timer(2000),
|
||||||
spellend_timer(0),
|
spellend_timer(0),
|
||||||
rewind_timer(30000), //Timer used for determining amount of time between actual player position updates for /rewind.
|
rewind_timer(30000), //Timer used for determining amount of time between actual player position updates for /rewind.
|
||||||
|
bindwound_timer(10000),
|
||||||
stunned_timer(0),
|
stunned_timer(0),
|
||||||
spun_timer(0),
|
spun_timer(0),
|
||||||
bardsong_timer(6000),
|
bardsong_timer(6000),
|
||||||
flee_timer(FLEE_CHECK_TIMER),
|
|
||||||
bindwound_timer(10000),
|
|
||||||
gravity_timer(1000),
|
gravity_timer(1000),
|
||||||
viral_timer(0)
|
viral_timer(0),
|
||||||
|
flee_timer(FLEE_CHECK_TIMER)
|
||||||
|
|
||||||
{
|
{
|
||||||
targeted = 0;
|
targeted = 0;
|
||||||
@ -878,7 +878,7 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
|
|||||||
|
|
||||||
// Changing the first string made it vanish, so it has some significance.
|
// Changing the first string made it vanish, so it has some significance.
|
||||||
if(lastname)
|
if(lastname)
|
||||||
sprintf(ns->spawn.DestructibleModel, lastname);
|
sprintf(ns->spawn.DestructibleModel, "%s", lastname);
|
||||||
// Changing the second string made no visible difference
|
// Changing the second string made no visible difference
|
||||||
sprintf(ns->spawn.DestructibleName2, "%s", ns->spawn.name);
|
sprintf(ns->spawn.DestructibleName2, "%s", ns->spawn.name);
|
||||||
// Putting a string in the final one that was previously empty had no visible effect.
|
// Putting a string in the final one that was previously empty had no visible effect.
|
||||||
|
|||||||
17
zone/mob.h
17
zone/mob.h
@ -969,11 +969,6 @@ protected:
|
|||||||
Timer tic_timer;
|
Timer tic_timer;
|
||||||
Timer mana_timer;
|
Timer mana_timer;
|
||||||
|
|
||||||
float rewind_x;
|
|
||||||
float rewind_y;
|
|
||||||
float rewind_z;
|
|
||||||
Timer rewind_timer;
|
|
||||||
|
|
||||||
//spell casting vars
|
//spell casting vars
|
||||||
Timer spellend_timer;
|
Timer spellend_timer;
|
||||||
uint16 casting_spell_id;
|
uint16 casting_spell_id;
|
||||||
@ -992,6 +987,11 @@ protected:
|
|||||||
uint8 bardsong_slot;
|
uint8 bardsong_slot;
|
||||||
uint32 bardsong_target_id;
|
uint32 bardsong_target_id;
|
||||||
|
|
||||||
|
float rewind_x;
|
||||||
|
float rewind_y;
|
||||||
|
float rewind_z;
|
||||||
|
Timer rewind_timer;
|
||||||
|
|
||||||
// Currently 3 max nimbus particle effects at a time
|
// Currently 3 max nimbus particle effects at a time
|
||||||
uint32 nimbus_effect1;
|
uint32 nimbus_effect1;
|
||||||
uint32 nimbus_effect2;
|
uint32 nimbus_effect2;
|
||||||
@ -1026,6 +1026,10 @@ protected:
|
|||||||
int16 rooted_mod; //Modifier to root break chance, defined when root is cast on a target.
|
int16 rooted_mod; //Modifier to root break chance, defined when root is cast on a target.
|
||||||
bool offhand;
|
bool offhand;
|
||||||
|
|
||||||
|
// Bind wound
|
||||||
|
Timer bindwound_timer;
|
||||||
|
Mob* bindwound_target;
|
||||||
|
|
||||||
Timer stunned_timer;
|
Timer stunned_timer;
|
||||||
Timer spun_timer;
|
Timer spun_timer;
|
||||||
Timer bardsong_timer;
|
Timer bardsong_timer;
|
||||||
@ -1108,9 +1112,6 @@ protected:
|
|||||||
uint32 pDontSnareMeBefore;
|
uint32 pDontSnareMeBefore;
|
||||||
uint32 pDontCureMeBefore;
|
uint32 pDontCureMeBefore;
|
||||||
|
|
||||||
// Bind wound
|
|
||||||
Timer bindwound_timer;
|
|
||||||
Mob* bindwound_target;
|
|
||||||
// hp event
|
// hp event
|
||||||
int nexthpevent;
|
int nexthpevent;
|
||||||
int nextinchpevent;
|
int nextinchpevent;
|
||||||
|
|||||||
@ -110,10 +110,10 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, float x, float y, float z, float
|
|||||||
classattack_timer(1000),
|
classattack_timer(1000),
|
||||||
knightattack_timer(1000),
|
knightattack_timer(1000),
|
||||||
assist_timer(AIassistcheck_delay),
|
assist_timer(AIassistcheck_delay),
|
||||||
|
qglobal_purge_timer(30000),
|
||||||
sendhpupdate_timer(1000),
|
sendhpupdate_timer(1000),
|
||||||
enraged_timer(1000),
|
enraged_timer(1000),
|
||||||
taunt_timer(TauntReuseTime * 1000),
|
taunt_timer(TauntReuseTime * 1000)
|
||||||
qglobal_purge_timer(30000)
|
|
||||||
{
|
{
|
||||||
//What is the point of this, since the names get mangled..
|
//What is the point of this, since the names get mangled..
|
||||||
Mob* mob = entity_list.GetMob(name);
|
Mob* mob = entity_list.GetMob(name);
|
||||||
|
|||||||
@ -130,7 +130,7 @@ void SpawnGroupList::AddSpawnGroup(SpawnGroup* newGroup) {
|
|||||||
|
|
||||||
SpawnGroup* SpawnGroupList::GetSpawnGroup(uint32 in_id) {
|
SpawnGroup* SpawnGroupList::GetSpawnGroup(uint32 in_id) {
|
||||||
if(groups.count(in_id) != 1)
|
if(groups.count(in_id) != 1)
|
||||||
return(false);
|
return nullptr;
|
||||||
return(groups[in_id]);
|
return(groups[in_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -75,17 +75,20 @@ void Mob::ApplySpecialAttackMod(SkillType skill, int32 &dmg, int32 &mindmg) {
|
|||||||
case ROUND_KICK:
|
case ROUND_KICK:
|
||||||
case KICK:
|
case KICK:
|
||||||
item_slot = SLOT_FEET;
|
item_slot = SLOT_FEET;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BASH:
|
case BASH:
|
||||||
item_slot = SLOT_SECONDARY;
|
item_slot = SLOT_SECONDARY;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DRAGON_PUNCH:
|
case DRAGON_PUNCH:
|
||||||
case EAGLE_STRIKE:
|
case EAGLE_STRIKE:
|
||||||
case TIGER_CLAW:
|
case TIGER_CLAW:
|
||||||
item_slot = SLOT_HANDS;
|
item_slot = SLOT_HANDS;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item_slot >= 0){
|
if (item_slot >= 0){
|
||||||
|
|||||||
@ -4488,12 +4488,13 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo
|
|||||||
case SE_TriggerOnCast:
|
case SE_TriggerOnCast:
|
||||||
{
|
{
|
||||||
if(type == focusTriggerOnCast)
|
if(type == focusTriggerOnCast)
|
||||||
|
{
|
||||||
if(MakeRandomInt(0, 100) <= focus_spell.base[i])
|
if(MakeRandomInt(0, 100) <= focus_spell.base[i])
|
||||||
value = focus_spell.base2[i];
|
value = focus_spell.base2[i];
|
||||||
|
|
||||||
else
|
else
|
||||||
value = 0;
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -5106,7 +5107,7 @@ bool Mob::TryDivineSave()
|
|||||||
{
|
{
|
||||||
SetHP(1);
|
SetHP(1);
|
||||||
|
|
||||||
uint16 EffectsToTry[] =
|
int16 EffectsToTry[] =
|
||||||
{
|
{
|
||||||
aabonuses.DivineSaveChance[1],
|
aabonuses.DivineSaveChance[1],
|
||||||
itembonuses.DivineSaveChance[1],
|
itembonuses.DivineSaveChance[1],
|
||||||
|
|||||||
@ -2482,10 +2482,8 @@ void ClientTaskState::SendTaskHistory(Client *c, int TaskIndex) {
|
|||||||
thd1 = (TaskHistoryReplyData1_Struct*)Ptr;
|
thd1 = (TaskHistoryReplyData1_Struct*)Ptr;
|
||||||
thd1->ActivityType = Task->Activity[i].Type;
|
thd1->ActivityType = Task->Activity[i].Type;
|
||||||
Ptr = (char *)thd1 + sizeof(TaskHistoryReplyData1_Struct);
|
Ptr = (char *)thd1 + sizeof(TaskHistoryReplyData1_Struct);
|
||||||
sprintf(Ptr, Task->Activity[i].Text1);
|
VARSTRUCT_ENCODE_STRING(Ptr, Task->Activity[i].Text1);
|
||||||
Ptr = Ptr + strlen(Ptr) + 1;
|
VARSTRUCT_ENCODE_STRING(Ptr, Task->Activity[i].Text2);
|
||||||
sprintf(Ptr, Task->Activity[i].Text2);
|
|
||||||
Ptr = Ptr + strlen(Ptr) + 1;
|
|
||||||
thd2 = (TaskHistoryReplyData2_Struct*)Ptr;
|
thd2 = (TaskHistoryReplyData2_Struct*)Ptr;
|
||||||
thd2->GoalCount = Task->Activity[i].GoalCount;
|
thd2->GoalCount = Task->Activity[i].GoalCount;
|
||||||
thd2->unknown04 = 0xffffffff;
|
thd2->unknown04 = 0xffffffff;
|
||||||
@ -2493,8 +2491,7 @@ void ClientTaskState::SendTaskHistory(Client *c, int TaskIndex) {
|
|||||||
thd2->ZoneID = Task->Activity[i].ZoneID;
|
thd2->ZoneID = Task->Activity[i].ZoneID;
|
||||||
thd2->unknown16 = 0x00000000;
|
thd2->unknown16 = 0x00000000;
|
||||||
Ptr = (char *)thd2 + sizeof(TaskHistoryReplyData2_Struct);
|
Ptr = (char *)thd2 + sizeof(TaskHistoryReplyData2_Struct);
|
||||||
sprintf(Ptr, Task->Activity[i].Text3);
|
VARSTRUCT_ENCODE_STRING(Ptr, Task->Activity[i].Text3);
|
||||||
Ptr = Ptr + strlen(Ptr) + 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2144,7 +2144,7 @@ void Client::ShowBuyLines(const EQApplicationPacket *app) {
|
|||||||
// This packet produces the SoandSo is browsing your Buy Lines message
|
// This packet produces the SoandSo is browsing your Buy Lines message
|
||||||
bb->Action = Barter_SellerBrowsing;
|
bb->Action = Barter_SellerBrowsing;
|
||||||
|
|
||||||
sprintf(bb->PlayerName, GetName());
|
sprintf(bb->PlayerName, "%s", GetName());
|
||||||
|
|
||||||
Buyer->QueuePacket(outapp);
|
Buyer->QueuePacket(outapp);
|
||||||
|
|
||||||
@ -2710,7 +2710,7 @@ void Client::BuyerItemSearch(const EQApplicationPacket *app) {
|
|||||||
pdest = strstr(Name, Criteria);
|
pdest = strstr(Name, Criteria);
|
||||||
|
|
||||||
if (pdest != nullptr) {
|
if (pdest != nullptr) {
|
||||||
sprintf(bisr->Results[Count].ItemName, item->Name);
|
sprintf(bisr->Results[Count].ItemName, "%s", item->Name);
|
||||||
bisr->Results[Count].ItemID = item->ID;
|
bisr->Results[Count].ItemID = item->ID;
|
||||||
bisr->Results[Count].Unknown068 = item->Icon;
|
bisr->Results[Count].Unknown068 = item->Icon;
|
||||||
bisr->Results[Count].Unknown072 = 0x00000000;
|
bisr->Results[Count].Unknown072 = 0x00000000;
|
||||||
|
|||||||
@ -93,6 +93,8 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -246,6 +248,8 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
|
|||||||
LogFile->write(EQEMuLog::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%s'. Not near a zone point.", GetName(), target_zone_name);
|
LogFile->write(EQEMuLog::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%s'. Not near a zone point.", GetName(), target_zone_name);
|
||||||
SendZoneCancel(zc);
|
SendZoneCancel(zc);
|
||||||
return;
|
return;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
};
|
};
|
||||||
|
|
||||||
//OK, now we should know where were going...
|
//OK, now we should know where were going...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user