mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 13:41:31 +00:00
Removed Common Profiler and Zone Profiler. They're well past outdated status and are just code bloat.
This commit is contained in:
parent
406e2f84eb
commit
fcd9b525a8
@ -94,7 +94,6 @@ SET(common_headers
|
|||||||
bodytypes.h
|
bodytypes.h
|
||||||
breakdowns.h
|
breakdowns.h
|
||||||
classes.h
|
classes.h
|
||||||
common_profile.h
|
|
||||||
Condition.h
|
Condition.h
|
||||||
crash.h
|
crash.h
|
||||||
CRC16.h
|
CRC16.h
|
||||||
|
|||||||
@ -531,7 +531,6 @@ ItemInst* ItemInstQueue::peek_front() const
|
|||||||
// Retrieve item at specified slot; returns false if item not found
|
// Retrieve item at specified slot; returns false if item not found
|
||||||
ItemInst* Inventory::GetItem(int16 slot_id) const
|
ItemInst* Inventory::GetItem(int16 slot_id) const
|
||||||
{
|
{
|
||||||
_CP(Inventory_GetItem);
|
|
||||||
ItemInst* result = nullptr;
|
ItemInst* result = nullptr;
|
||||||
|
|
||||||
// Cursor
|
// Cursor
|
||||||
@ -862,7 +861,6 @@ bool Inventory::SwapItem(int16 slot_a, int16 slot_b)
|
|||||||
|
|
||||||
int16 Inventory::HasItem(uint32 item_id, uint8 quantity, uint8 where)
|
int16 Inventory::HasItem(uint32 item_id, uint8 quantity, uint8 where)
|
||||||
{
|
{
|
||||||
_CP(Inventory_HasItem);
|
|
||||||
int16 slot_id = SLOT_INVALID;
|
int16 slot_id = SLOT_INVALID;
|
||||||
|
|
||||||
//Altered by Father Nitwit to support a specification of
|
//Altered by Father Nitwit to support a specification of
|
||||||
|
|||||||
@ -185,7 +185,6 @@ const char * itoa(int num, char* a,int b) {
|
|||||||
*/
|
*/
|
||||||
int MakeRandomInt(int low, int high)
|
int MakeRandomInt(int low, int high)
|
||||||
{
|
{
|
||||||
_CP(MakeRandomInt);
|
|
||||||
if(low >= high)
|
if(low >= high)
|
||||||
return(low);
|
return(low);
|
||||||
|
|
||||||
@ -203,7 +202,6 @@ int MakeRandomInt(int low, int high)
|
|||||||
|
|
||||||
double MakeRandomFloat(double low, double high)
|
double MakeRandomFloat(double low, double high)
|
||||||
{
|
{
|
||||||
_CP(MakeRandomFloat);
|
|
||||||
if(low >= high)
|
if(low >= high)
|
||||||
return(low);
|
return(low);
|
||||||
|
|
||||||
|
|||||||
@ -85,21 +85,13 @@ Mutex::Mutex() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Mutex::~Mutex() {
|
Mutex::~Mutex() {
|
||||||
#if DEBUG_MUTEX_CLASS >= 7
|
|
||||||
std::cout << "Deconstructing Mutex" << std::endl;
|
|
||||||
#endif
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
DeleteCriticalSection(&CSMutex);
|
DeleteCriticalSection(&CSMutex);
|
||||||
#else
|
#else
|
||||||
// pthread_mutex_destroy(&CSMutex);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mutex::lock() {
|
void Mutex::lock() {
|
||||||
_CP(Mutex_lock);
|
|
||||||
#if DEBUG_MUTEX_CLASS >= 9
|
|
||||||
std::cout << "Locking Mutex" << std::endl;
|
|
||||||
#endif
|
|
||||||
#if DEBUG_MUTEX_CLASS >= 5
|
#if DEBUG_MUTEX_CLASS >= 5
|
||||||
if (!trylock()) {
|
if (!trylock()) {
|
||||||
std::cout << "Locking Mutex: Having to wait" << std::endl;
|
std::cout << "Locking Mutex: Having to wait" << std::endl;
|
||||||
@ -119,9 +111,6 @@ void Mutex::lock() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Mutex::trylock() {
|
bool Mutex::trylock() {
|
||||||
#if DEBUG_MUTEX_CLASS >= 9
|
|
||||||
std::cout << "TryLocking Mutex" << std::endl;
|
|
||||||
#endif
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
#if(_WIN32_WINNT >= 0x0400)
|
#if(_WIN32_WINNT >= 0x0400)
|
||||||
if (TrylockSupported)
|
if (TrylockSupported)
|
||||||
@ -140,9 +129,6 @@ bool Mutex::trylock() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Mutex::unlock() {
|
void Mutex::unlock() {
|
||||||
#if DEBUG_MUTEX_CLASS >= 9
|
|
||||||
std::cout << "Unlocking Mutex" << std::endl;
|
|
||||||
#endif
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
LeaveCriticalSection(&CSMutex);
|
LeaveCriticalSection(&CSMutex);
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -904,7 +904,6 @@ ThreadReturnType TCPConnection::TCPConnectionLoop(void* tmp) {
|
|||||||
while (tcpc->RunLoop()) {
|
while (tcpc->RunLoop()) {
|
||||||
Sleep(LOOP_GRANULARITY);
|
Sleep(LOOP_GRANULARITY);
|
||||||
if (!tcpc->ConnectReady()) {
|
if (!tcpc->ConnectReady()) {
|
||||||
_CP(TCPConnectionLoop);
|
|
||||||
if (!tcpc->Process()) {
|
if (!tcpc->Process()) {
|
||||||
//the processing loop has detecting an error..
|
//the processing loop has detecting an error..
|
||||||
//we want to drop the link immediately, so we clear buffers too.
|
//we want to drop the link immediately, so we clear buffers too.
|
||||||
@ -914,7 +913,6 @@ ThreadReturnType TCPConnection::TCPConnectionLoop(void* tmp) {
|
|||||||
Sleep(1);
|
Sleep(1);
|
||||||
}
|
}
|
||||||
else if (tcpc->GetAsyncConnect()) {
|
else if (tcpc->GetAsyncConnect()) {
|
||||||
_CP(TCPConnectionLoop);
|
|
||||||
if (tcpc->charAsyncConnect)
|
if (tcpc->charAsyncConnect)
|
||||||
tcpc->Connect(tcpc->charAsyncConnect, tcpc->GetrPort());
|
tcpc->Connect(tcpc->charAsyncConnect, tcpc->GetrPort());
|
||||||
else
|
else
|
||||||
|
|||||||
@ -71,7 +71,6 @@ ThreadReturnType BaseTCPServer::TCPServerLoop(void* tmp) {
|
|||||||
|
|
||||||
tcps->MLoopRunning.lock();
|
tcps->MLoopRunning.lock();
|
||||||
while (tcps->RunLoop()) {
|
while (tcps->RunLoop()) {
|
||||||
_CP(BaseTCPServerLoop);
|
|
||||||
Sleep(SERVER_LOOP_GRANULARITY);
|
Sleep(SERVER_LOOP_GRANULARITY);
|
||||||
tcps->Process();
|
tcps->Process();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,103 +0,0 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
Copyright (C) 2001-2004 EQEMu Development Team (http://eqemulator.net)
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; version 2 of the License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
|
||||||
are required to give you total support for your newly bought product;
|
|
||||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
#ifndef COMMON_PROFILE_H
|
|
||||||
#define COMMON_PROFILE_H
|
|
||||||
|
|
||||||
#ifdef ZONE
|
|
||||||
#include "../common/features.h"
|
|
||||||
|
|
||||||
#ifndef EQPROFILE
|
|
||||||
#ifdef COMMON_PROFILE
|
|
||||||
#undef COMMON_PROFILE
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef COMMON_PROFILE
|
|
||||||
|
|
||||||
#include "../common/profiler.h"
|
|
||||||
|
|
||||||
class CommonProfiler : public GeneralProfiler {
|
|
||||||
public:
|
|
||||||
enum {
|
|
||||||
Database_SaveInventory = 0,
|
|
||||||
Database_StoreCharacter,
|
|
||||||
Database_GetCharacterInfoForLogin,
|
|
||||||
Database_GetCharacterInfoForLogin_result,
|
|
||||||
Database_GetPlayerProfile,
|
|
||||||
Database_GetInventory,
|
|
||||||
Database_GetInventory_name,
|
|
||||||
Database_SetPlayerProfile,
|
|
||||||
Database_DBLoadItems,
|
|
||||||
Database_GetWaypoints,
|
|
||||||
Database_DBLoadNPCFactionLists,
|
|
||||||
|
|
||||||
DBcore_RunQuery,
|
|
||||||
|
|
||||||
DBAsync_ProcessWork,
|
|
||||||
DBAsync_DispatchWork,
|
|
||||||
DBAsyncLoop_loop,
|
|
||||||
|
|
||||||
EQStreamServer_Process,
|
|
||||||
|
|
||||||
EQStream_Process,
|
|
||||||
|
|
||||||
EQStreamServerLoop,
|
|
||||||
EQStreamInLoop,
|
|
||||||
EQStreamOutLoop,
|
|
||||||
TCPServerLoop,
|
|
||||||
TCPConnectionLoop,
|
|
||||||
|
|
||||||
Inventory_GetItem,
|
|
||||||
Inventory_HasItem,
|
|
||||||
|
|
||||||
BaseTCPServerLoop,
|
|
||||||
|
|
||||||
MakeRandomInt,
|
|
||||||
MakeRandomFloat,
|
|
||||||
|
|
||||||
Mutex_lock,
|
|
||||||
Timer_Check,
|
|
||||||
|
|
||||||
WorldConnection_Process,
|
|
||||||
|
|
||||||
MaxCommonProfilerId
|
|
||||||
};
|
|
||||||
|
|
||||||
inline CommonProfiler() : GeneralProfiler(MaxCommonProfilerId) { }
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
extern CommonProfiler _cp;
|
|
||||||
|
|
||||||
|
|
||||||
#define _CP(name) _GP(_cp, CommonProfiler, name)
|
|
||||||
|
|
||||||
#else
|
|
||||||
//no zone profiling, dummy functions
|
|
||||||
#define _CP(name) ;
|
|
||||||
|
|
||||||
#endif //COMMON_PROFILE
|
|
||||||
|
|
||||||
#else //else !ZONE
|
|
||||||
|
|
||||||
#define _CP(name) ;
|
|
||||||
|
|
||||||
#endif //!ZONE
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@ -706,7 +706,6 @@ bool Database::DeleteCharacter(char *name)
|
|||||||
// Store new character information into the character_ and inventory tables
|
// Store new character information into the character_ and inventory tables
|
||||||
bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inventory* inv, ExtendedProfile_Struct *ext)
|
bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inventory* inv, ExtendedProfile_Struct *ext)
|
||||||
{
|
{
|
||||||
_CP(Database_StoreCharacter);
|
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char query[256+sizeof(PlayerProfile_Struct)*2+sizeof(ExtendedProfile_Struct)*2+5];
|
char query[256+sizeof(PlayerProfile_Struct)*2+sizeof(ExtendedProfile_Struct)*2+5];
|
||||||
char* end = query;
|
char* end = query;
|
||||||
|
|||||||
@ -11,7 +11,6 @@
|
|||||||
#include <mysqld_error.h>
|
#include <mysqld_error.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include "dbcore.h"
|
#include "dbcore.h"
|
||||||
#include "common_profile.h"
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
//#include "../common/MiscFunctions.h"
|
//#include "../common/MiscFunctions.h"
|
||||||
#include "StringUtil.h"
|
#include "StringUtil.h"
|
||||||
@ -54,10 +53,8 @@ ThreadReturnType DBAsyncLoop(void* tmp) {
|
|||||||
//we could check dba->RunLoop() again to see if we
|
//we could check dba->RunLoop() again to see if we
|
||||||
//got turned off while we were waiting
|
//got turned off while we were waiting
|
||||||
{
|
{
|
||||||
_CP(DBAsyncLoop_loop);
|
|
||||||
dba->Process();
|
dba->Process();
|
||||||
}
|
}
|
||||||
// Sleep(ASYNC_LOOP_GRANULARITY);
|
|
||||||
}
|
}
|
||||||
dba->MLoopRunning.unlock();
|
dba->MLoopRunning.unlock();
|
||||||
|
|
||||||
@ -302,11 +299,7 @@ void DBAsync::CommitWrites() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DBAsync::ProcessWork(DBAsyncWork* iWork, bool iSleep) {
|
void DBAsync::ProcessWork(DBAsyncWork* iWork, bool iSleep) {
|
||||||
_CP(DBAsync_ProcessWork);
|
|
||||||
DBAsyncQuery* CurrentQuery;
|
DBAsyncQuery* CurrentQuery;
|
||||||
#if DEBUG_MYSQL_QUERIES >= 2
|
|
||||||
std::cout << "Processing AsyncWork #" << iWork->GetWorkID() << std::endl;
|
|
||||||
#endif
|
|
||||||
while ((CurrentQuery = iWork->PopQuery())) {
|
while ((CurrentQuery = iWork->PopQuery())) {
|
||||||
CurrentQuery->Process(pDBC);
|
CurrentQuery->Process(pDBC);
|
||||||
iWork->PushAnswer(CurrentQuery);
|
iWork->PushAnswer(CurrentQuery);
|
||||||
@ -316,7 +309,6 @@ void DBAsync::ProcessWork(DBAsyncWork* iWork, bool iSleep) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DBAsync::DispatchWork(DBAsyncWork* iWork) {
|
void DBAsync::DispatchWork(DBAsyncWork* iWork) {
|
||||||
_CP(DBAsync_DispatchWork);
|
|
||||||
//if this work has a callback, call it
|
//if this work has a callback, call it
|
||||||
//otherwise, stick the work on the finish queue
|
//otherwise, stick the work on the finish queue
|
||||||
if (iWork->pCB) {
|
if (iWork->pCB) {
|
||||||
|
|||||||
@ -59,7 +59,6 @@ void DBcore::ping() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool DBcore::RunQuery(const char* query, uint32 querylen, char* errbuf, MYSQL_RES** result, uint32* affected_rows, uint32* last_insert_id, uint32* errnum, bool retry) {
|
bool DBcore::RunQuery(const char* query, uint32 querylen, char* errbuf, MYSQL_RES** result, uint32* affected_rows, uint32* last_insert_id, uint32* errnum, bool retry) {
|
||||||
_CP(DBcore_RunQuery);
|
|
||||||
if (errnum)
|
if (errnum)
|
||||||
*errnum = 0;
|
*errnum = 0;
|
||||||
if (errbuf)
|
if (errbuf)
|
||||||
@ -68,11 +67,7 @@ bool DBcore::RunQuery(const char* query, uint32 querylen, char* errbuf, MYSQL_RE
|
|||||||
LockMutex lock(&MDatabase);
|
LockMutex lock(&MDatabase);
|
||||||
if (pStatus != Connected)
|
if (pStatus != Connected)
|
||||||
Open();
|
Open();
|
||||||
#if DEBUG_MYSQL_QUERIES >= 1
|
|
||||||
char tmp[120];
|
|
||||||
strn0cpy(tmp, query, sizeof(tmp));
|
|
||||||
std::cout << "QUERY: " << tmp << std::endl;
|
|
||||||
#endif
|
|
||||||
if (mysql_real_query(&mysql, query, querylen)) {
|
if (mysql_real_query(&mysql, query, querylen)) {
|
||||||
if (mysql_errno(&mysql) == CR_SERVER_GONE_ERROR)
|
if (mysql_errno(&mysql) == CR_SERVER_GONE_ERROR)
|
||||||
pStatus = Error;
|
pStatus = Error;
|
||||||
|
|||||||
@ -68,10 +68,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "logsys.h"
|
#include "logsys.h"
|
||||||
#include "common_profile.h"
|
|
||||||
#ifdef ZONE
|
|
||||||
#include "../zone/zone_profile.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "../common/Mutex.h"
|
#include "../common/Mutex.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
@ -200,7 +200,6 @@ bool SharedDatabase::VerifyInventory(uint32 account_id, int16 slot_id, const Ite
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool SharedDatabase::SaveInventory(uint32 char_id, const ItemInst* inst, int16 slot_id) {
|
bool SharedDatabase::SaveInventory(uint32 char_id, const ItemInst* inst, int16 slot_id) {
|
||||||
_CP(Database_SaveInventory);
|
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char* query = 0;
|
char* query = 0;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
@ -509,7 +508,6 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory* inv, bool is_charid) {
|
|||||||
|
|
||||||
// Overloaded: Retrieve character inventory based on character id
|
// Overloaded: Retrieve character inventory based on character id
|
||||||
bool SharedDatabase::GetInventory(uint32 char_id, Inventory* inv) {
|
bool SharedDatabase::GetInventory(uint32 char_id, Inventory* inv) {
|
||||||
_CP(Database_GetInventory);
|
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char* query = 0;
|
char* query = 0;
|
||||||
MYSQL_RES* result;
|
MYSQL_RES* result;
|
||||||
@ -618,7 +616,6 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory* inv) {
|
|||||||
|
|
||||||
// Overloaded: Retrieve character inventory based on account_id and character name
|
// Overloaded: Retrieve character inventory based on account_id and character name
|
||||||
bool SharedDatabase::GetInventory(uint32 account_id, char* name, Inventory* inv) {
|
bool SharedDatabase::GetInventory(uint32 account_id, char* name, Inventory* inv) {
|
||||||
_CP(Database_GetInventory_name);
|
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char* query = 0;
|
char* query = 0;
|
||||||
MYSQL_RES* result;
|
MYSQL_RES* result;
|
||||||
@ -1204,7 +1201,6 @@ bool SharedDatabase::LoadNPCFactionLists() {
|
|||||||
// character name "name". Return true if the character was found, otherwise false.
|
// character name "name". Return true if the character was found, otherwise false.
|
||||||
// False will also be returned if there is a database error.
|
// False will also be returned if there is a database error.
|
||||||
bool SharedDatabase::GetPlayerProfile(uint32 account_id, char* name, PlayerProfile_Struct* pp, Inventory* inv, ExtendedProfile_Struct *ext, char* current_zone, uint32 *current_instance) {
|
bool SharedDatabase::GetPlayerProfile(uint32 account_id, char* name, PlayerProfile_Struct* pp, Inventory* inv, ExtendedProfile_Struct *ext, char* current_zone, uint32 *current_instance) {
|
||||||
_CP(Database_GetPlayerProfile);
|
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char* query = 0;
|
char* query = 0;
|
||||||
MYSQL_RES* result;
|
MYSQL_RES* result;
|
||||||
@ -1258,7 +1254,6 @@ bool SharedDatabase::GetPlayerProfile(uint32 account_id, char* name, PlayerProfi
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool SharedDatabase::SetPlayerProfile(uint32 account_id, uint32 charid, PlayerProfile_Struct* pp, Inventory* inv, ExtendedProfile_Struct *ext, uint32 current_zone, uint32 current_instance, uint8 MaxXTargets) {
|
bool SharedDatabase::SetPlayerProfile(uint32 account_id, uint32 charid, PlayerProfile_Struct* pp, Inventory* inv, ExtendedProfile_Struct *ext, uint32 current_zone, uint32 current_instance, uint8 MaxXTargets) {
|
||||||
_CP(Database_SetPlayerProfile);
|
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char* query = 0;
|
char* query = 0;
|
||||||
uint32 affected_rows = 0;
|
uint32 affected_rows = 0;
|
||||||
|
|||||||
@ -82,13 +82,6 @@ int gettimeofday (timeval *tp, ...)
|
|||||||
/* This function checks if the timer triggered */
|
/* This function checks if the timer triggered */
|
||||||
bool Timer::Check(bool iReset)
|
bool Timer::Check(bool iReset)
|
||||||
{
|
{
|
||||||
_CP(Timer_Check);
|
|
||||||
if (this==0) {
|
|
||||||
std::cerr << "Null timer during ->Check()!?\n";
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
// if (!current_time || !start_time || !timer_time) {cerr << "Timer::Check on a timer that does not have a vital member defined.";
|
|
||||||
// return true;}
|
|
||||||
if (enabled && current_time-start_time > timer_time) {
|
if (enabled && current_time-start_time > timer_time) {
|
||||||
if (iReset) {
|
if (iReset) {
|
||||||
if (pUseAcurateTiming)
|
if (pUseAcurateTiming)
|
||||||
|
|||||||
@ -59,8 +59,6 @@ void WorldConnection::OnConnected() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WorldConnection::Process() {
|
void WorldConnection::Process() {
|
||||||
_CP(WorldConnection_Process);
|
|
||||||
|
|
||||||
//persistent connection....
|
//persistent connection....
|
||||||
if (!Connected()) {
|
if (!Connected()) {
|
||||||
pConnected = tcpc.Connected();
|
pConnected = tcpc.Connected();
|
||||||
|
|||||||
@ -68,14 +68,6 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
Zone only right now.
|
|
||||||
#ifdef EQPROFILE
|
|
||||||
#ifdef COMMON_PROFILE
|
|
||||||
CommonProfiler _cp;
|
|
||||||
#endif
|
|
||||||
#endif*/
|
|
||||||
|
|
||||||
#include "zoneserver.h"
|
#include "zoneserver.h"
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
#include "LoginServer.h"
|
#include "LoginServer.h"
|
||||||
|
|||||||
@ -112,7 +112,6 @@ SET(zone_sources
|
|||||||
worldserver.cpp
|
worldserver.cpp
|
||||||
zone.cpp
|
zone.cpp
|
||||||
zone_logsys.cpp
|
zone_logsys.cpp
|
||||||
zone_profile.cpp
|
|
||||||
ZoneConfig.cpp
|
ZoneConfig.cpp
|
||||||
zonedb.cpp
|
zonedb.cpp
|
||||||
zonedbasync.cpp
|
zonedbasync.cpp
|
||||||
@ -195,7 +194,6 @@ SET(zone_headers
|
|||||||
watermap.h
|
watermap.h
|
||||||
worldserver.h
|
worldserver.h
|
||||||
zone.h
|
zone.h
|
||||||
zone_profile.h
|
|
||||||
ZoneConfig.h
|
ZoneConfig.h
|
||||||
zonedb.h
|
zonedb.h
|
||||||
zonedbasync.h
|
zonedbasync.h
|
||||||
@ -235,6 +233,4 @@ IF(UNIX)
|
|||||||
ADD_DEFINITIONS(-fPIC)
|
ADD_DEFINITIONS(-fPIC)
|
||||||
ENDIF(UNIX)
|
ENDIF(UNIX)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${VLD_INCLUDE_DIR})
|
|
||||||
|
|
||||||
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/Bin)
|
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/Bin)
|
||||||
|
|||||||
@ -27,7 +27,6 @@
|
|||||||
#define SLOW_AND_CRAPPY_MAKES_VALGRIND_HAPPY
|
#define SLOW_AND_CRAPPY_MAKES_VALGRIND_HAPPY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "zone_profile.h"
|
|
||||||
#include "map.h"
|
#include "map.h"
|
||||||
#include "zone.h"
|
#include "zone.h"
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
@ -378,7 +377,6 @@ float Map::GetFaceHeight( int _idx, float x, float y ) const {
|
|||||||
|
|
||||||
bool Map::LineIntersectsZone(VERTEX start, VERTEX end, float step_mag, VERTEX *result, FACE **on) const
|
bool Map::LineIntersectsZone(VERTEX start, VERTEX end, float step_mag, VERTEX *result, FACE **on) const
|
||||||
{
|
{
|
||||||
_ZP(Map_LineIntersectsZone);
|
|
||||||
// Cast a ray from start to end, checking for collisions in each node between the two points.
|
// Cast a ray from start to end, checking for collisions in each node between the two points.
|
||||||
//
|
//
|
||||||
float stepx, stepy, stepz, curx, cury, curz;
|
float stepx, stepy, stepz, curx, cury, curz;
|
||||||
@ -464,7 +462,6 @@ bool Map::LocWithinNode( NodeRef node_r, float x, float y ) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Map::LineIntersectsNode( NodeRef node_r, VERTEX p1, VERTEX p2, VERTEX *result, FACE **on) const {
|
bool Map::LineIntersectsNode( NodeRef node_r, VERTEX p1, VERTEX p2, VERTEX *result, FACE **on) const {
|
||||||
_ZP(Map_LineIntersectsNode);
|
|
||||||
if( node_r == NODE_NONE || node_r >= m_Nodes) {
|
if( node_r == NODE_NONE || node_r >= m_Nodes) {
|
||||||
return(true); //can see through empty nodes, just allow LOS on error...
|
return(true); //can see through empty nodes, just allow LOS on error...
|
||||||
}
|
}
|
||||||
@ -497,7 +494,6 @@ bool Map::LineIntersectsNode( NodeRef node_r, VERTEX p1, VERTEX p2, VERTEX *resu
|
|||||||
|
|
||||||
|
|
||||||
float Map::FindBestZ( NodeRef node_r, VERTEX p1, VERTEX *result, FACE **on) const {
|
float Map::FindBestZ( NodeRef node_r, VERTEX p1, VERTEX *result, FACE **on) const {
|
||||||
_ZP(Map_FindBestZ);
|
|
||||||
|
|
||||||
p1.z += RuleI(Map, FindBestZHeightAdjust);
|
p1.z += RuleI(Map, FindBestZHeightAdjust);
|
||||||
|
|
||||||
|
|||||||
@ -47,8 +47,6 @@ extern Zone *zone;
|
|||||||
|
|
||||||
//NOTE: do NOT pass in beneficial and detrimental spell types into the same call here!
|
//NOTE: do NOT pass in beneficial and detrimental spell types into the same call here!
|
||||||
bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint16 iSpellTypes) {
|
bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint16 iSpellTypes) {
|
||||||
_ZP(Mob_AICastSpell);
|
|
||||||
// Faction isnt checked here, it's assumed you wouldnt pass a spell type you wouldnt want casted on the mob
|
|
||||||
if (!tar)
|
if (!tar)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -340,8 +338,6 @@ bool NPC::AIDoSpellCast(uint8 i, Mob* tar, int32 mana_cost, uint32* oDontDoAgain
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool EntityList::AICheckCloseBeneficialSpells(NPC* caster, uint8 iChance, float iRange, uint16 iSpellTypes) {
|
bool EntityList::AICheckCloseBeneficialSpells(NPC* caster, uint8 iChance, float iRange, uint16 iSpellTypes) {
|
||||||
_ZP(EntityList_AICheckCloseBeneficialSpells);
|
|
||||||
|
|
||||||
if((iSpellTypes&SpellTypes_Detrimental) != 0) {
|
if((iSpellTypes&SpellTypes_Detrimental) != 0) {
|
||||||
//according to live, you can buff and heal through walls...
|
//according to live, you can buff and heal through walls...
|
||||||
//now with PCs, this only applies if you can TARGET the target, but
|
//now with PCs, this only applies if you can TARGET the target, but
|
||||||
@ -991,8 +987,6 @@ void Client::AI_Process()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Mob::AI_Process() {
|
void Mob::AI_Process() {
|
||||||
_ZP(Mob_AI_Process);
|
|
||||||
|
|
||||||
if (!IsAIControlled())
|
if (!IsAIControlled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1056,7 +1050,6 @@ void Mob::AI_Process() {
|
|||||||
|
|
||||||
if (engaged)
|
if (engaged)
|
||||||
{
|
{
|
||||||
_ZP(Mob_AI_Process_engaged);
|
|
||||||
if (IsRooted())
|
if (IsRooted())
|
||||||
SetTarget(hate_list.GetClosest(this));
|
SetTarget(hate_list.GetClosest(this));
|
||||||
else
|
else
|
||||||
@ -1449,7 +1442,6 @@ void Mob::AI_Process() {
|
|||||||
* by the clients.
|
* by the clients.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
_ZP(Mob_AI_Process_scanarea);
|
|
||||||
|
|
||||||
Mob* tmptar = entity_list.AICheckCloseAggro(this, GetAggroRange(), GetAssistRange());
|
Mob* tmptar = entity_list.AICheckCloseAggro(this, GetAggroRange(), GetAssistRange());
|
||||||
if (tmptar)
|
if (tmptar)
|
||||||
@ -1457,11 +1449,9 @@ void Mob::AI_Process() {
|
|||||||
}
|
}
|
||||||
else if (AImovement_timer->Check() && !IsRooted())
|
else if (AImovement_timer->Check() && !IsRooted())
|
||||||
{
|
{
|
||||||
_ZP(Mob_AI_Process_move);
|
|
||||||
SetRunAnimSpeed(0);
|
SetRunAnimSpeed(0);
|
||||||
if (IsPet())
|
if (IsPet())
|
||||||
{
|
{
|
||||||
_ZP(Mob_AI_Process_pet);
|
|
||||||
// we're a pet, do as we're told
|
// we're a pet, do as we're told
|
||||||
switch (pStandingPetOrder)
|
switch (pStandingPetOrder)
|
||||||
{
|
{
|
||||||
@ -1596,7 +1586,6 @@ void NPC::AI_DoMovement() {
|
|||||||
return; //this is idle movement at walk speed, and we are unable to walk right now.
|
return; //this is idle movement at walk speed, and we are unable to walk right now.
|
||||||
|
|
||||||
if (roambox_distance > 0) {
|
if (roambox_distance > 0) {
|
||||||
_ZP(Mob_AI_Process_roambox);
|
|
||||||
if (
|
if (
|
||||||
roambox_movingto_x > roambox_max_x
|
roambox_movingto_x > roambox_max_x
|
||||||
|| roambox_movingto_x < roambox_min_x
|
|| roambox_movingto_x < roambox_min_x
|
||||||
@ -1635,7 +1624,6 @@ void NPC::AI_DoMovement() {
|
|||||||
}
|
}
|
||||||
else if (roamer)
|
else if (roamer)
|
||||||
{
|
{
|
||||||
_ZP(Mob_AI_Process_roamer);
|
|
||||||
if (AIwalking_timer->Check())
|
if (AIwalking_timer->Check())
|
||||||
{
|
{
|
||||||
movetimercompleted=true;
|
movetimercompleted=true;
|
||||||
@ -1749,8 +1737,6 @@ void NPC::AI_DoMovement() {
|
|||||||
}
|
}
|
||||||
else if (IsGuarding())
|
else if (IsGuarding())
|
||||||
{
|
{
|
||||||
_ZP(Mob_AI_Process_guard);
|
|
||||||
|
|
||||||
bool CP2Moved;
|
bool CP2Moved;
|
||||||
if(!RuleB(Pathing, Guard) || !zone->pathing)
|
if(!RuleB(Pathing, Guard) || !zone->pathing)
|
||||||
CP2Moved = CalculateNewPosition2(guard_x, guard_y, guard_z, walksp);
|
CP2Moved = CalculateNewPosition2(guard_x, guard_y, guard_z, walksp);
|
||||||
@ -1898,7 +1884,6 @@ void NPC::AI_Event_SpellCastFinished(bool iCastSucceeded, uint8 slot) {
|
|||||||
|
|
||||||
bool NPC::AI_EngagedCastCheck() {
|
bool NPC::AI_EngagedCastCheck() {
|
||||||
if (AIautocastspell_timer->Check(false)) {
|
if (AIautocastspell_timer->Check(false)) {
|
||||||
_ZP(Mob_AI_Process_engaged_cast);
|
|
||||||
AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting.
|
AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting.
|
||||||
|
|
||||||
mlog(AI__SPELLS, "Engaged autocast check triggered. Trying to cast healing spells then maybe offensive spells.");
|
mlog(AI__SPELLS, "Engaged autocast check triggered. Trying to cast healing spells then maybe offensive spells.");
|
||||||
@ -1922,7 +1907,6 @@ bool NPC::AI_EngagedCastCheck() {
|
|||||||
|
|
||||||
bool NPC::AI_PursueCastCheck() {
|
bool NPC::AI_PursueCastCheck() {
|
||||||
if (AIautocastspell_timer->Check(false)) {
|
if (AIautocastspell_timer->Check(false)) {
|
||||||
_ZP(Mob_AI_Process_pursue_cast);
|
|
||||||
AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting.
|
AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting.
|
||||||
|
|
||||||
mlog(AI__SPELLS, "Engaged (pursuing) autocast check triggered. Trying to cast offensive spells.");
|
mlog(AI__SPELLS, "Engaged (pursuing) autocast check triggered. Trying to cast offensive spells.");
|
||||||
@ -1937,7 +1921,6 @@ bool NPC::AI_PursueCastCheck() {
|
|||||||
|
|
||||||
bool NPC::AI_IdleCastCheck() {
|
bool NPC::AI_IdleCastCheck() {
|
||||||
if (AIautocastspell_timer->Check(false)) {
|
if (AIautocastspell_timer->Check(false)) {
|
||||||
_ZP(Mob_AI_Process_autocast);
|
|
||||||
#if MobAI_DEBUG_Spells >= 25
|
#if MobAI_DEBUG_Spells >= 25
|
||||||
std::cout << "Non-Engaged autocast check triggered: " << this->GetName() << std::endl;
|
std::cout << "Non-Engaged autocast check triggered: " << this->GetName() << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -33,11 +33,9 @@ extern Zone* zone;
|
|||||||
|
|
||||||
//look around a client for things which might aggro the client.
|
//look around a client for things which might aggro the client.
|
||||||
void EntityList::CheckClientAggro(Client *around) {
|
void EntityList::CheckClientAggro(Client *around) {
|
||||||
_ZP(EntityList_CheckClientAggro);
|
|
||||||
|
|
||||||
LinkedListIterator<Mob*> iterator(mob_list);
|
LinkedListIterator<Mob*> iterator(mob_list);
|
||||||
for(iterator.Reset(); iterator.MoreElements(); iterator.Advance()) {
|
for(iterator.Reset(); iterator.MoreElements(); iterator.Advance()) {
|
||||||
_ZP(EntityList_CheckClientAggro_Loop);
|
|
||||||
Mob* mob = iterator.GetData();
|
Mob* mob = iterator.GetData();
|
||||||
if(mob->IsClient()) //also ensures that mob != around
|
if(mob->IsClient()) //also ensures that mob != around
|
||||||
continue;
|
continue;
|
||||||
@ -245,7 +243,6 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
|
|||||||
bool Mob::CheckWillAggro(Mob *mob) {
|
bool Mob::CheckWillAggro(Mob *mob) {
|
||||||
if(!mob)
|
if(!mob)
|
||||||
return false;
|
return false;
|
||||||
_ZP(Mob_CheckWillAggro);
|
|
||||||
|
|
||||||
//sometimes if a client has some lag while zoning into a dangerous place while either invis or a GM
|
//sometimes if a client has some lag while zoning into a dangerous place while either invis or a GM
|
||||||
//they will aggro mobs even though it's supposed to be impossible, to lets make sure we've finished connecting
|
//they will aggro mobs even though it's supposed to be impossible, to lets make sure we've finished connecting
|
||||||
@ -369,7 +366,6 @@ bool Mob::CheckWillAggro(Mob *mob) {
|
|||||||
Mob* EntityList::AICheckCloseAggro(Mob* sender, float iAggroRange, float iAssistRange) {
|
Mob* EntityList::AICheckCloseAggro(Mob* sender, float iAggroRange, float iAssistRange) {
|
||||||
if (!sender || !sender->IsNPC())
|
if (!sender || !sender->IsNPC())
|
||||||
return(nullptr);
|
return(nullptr);
|
||||||
_ZP(EntityList_AICheckCloseAggro);
|
|
||||||
|
|
||||||
#ifdef REVERSE_AGGRO
|
#ifdef REVERSE_AGGRO
|
||||||
//with reverse aggro, npc->client is checked elsewhere, no need to check again
|
//with reverse aggro, npc->client is checked elsewhere, no need to check again
|
||||||
@ -433,7 +429,6 @@ int EntityList::GetHatedCount(Mob *attacker, Mob *exclude) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EntityList::AIYellForHelp(Mob* sender, Mob* attacker) {
|
void EntityList::AIYellForHelp(Mob* sender, Mob* attacker) {
|
||||||
_ZP(EntityList_AIYellForHelp);
|
|
||||||
if(!sender || !attacker)
|
if(!sender || !attacker)
|
||||||
return;
|
return;
|
||||||
if (sender->GetPrimaryFaction() == 0 )
|
if (sender->GetPrimaryFaction() == 0 )
|
||||||
@ -1035,7 +1030,6 @@ bool Mob::CheckLosFN(float posX, float posY, float posZ, float mobSize) {
|
|||||||
return(false);
|
return(false);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
_ZP(Mob_CheckLosFN);
|
|
||||||
|
|
||||||
VERTEX myloc;
|
VERTEX myloc;
|
||||||
VERTEX oloc;
|
VERTEX oloc;
|
||||||
|
|||||||
@ -776,7 +776,6 @@ void Mob::MeleeMitigation(Mob *attacker, int32 &damage, int32 minhit, ExtraAttac
|
|||||||
//GetWeaponDamage(mob*, const Item_Struct*) is intended to be used for mobs or any other situation where we do not have a client inventory item
|
//GetWeaponDamage(mob*, const Item_Struct*) is intended to be used for mobs or any other situation where we do not have a client inventory item
|
||||||
//GetWeaponDamage(mob*, const ItemInst*) is intended to be used for situations where we have a client inventory item
|
//GetWeaponDamage(mob*, const ItemInst*) is intended to be used for situations where we have a client inventory item
|
||||||
int Mob::GetWeaponDamage(Mob *against, const Item_Struct *weapon_item) {
|
int Mob::GetWeaponDamage(Mob *against, const Item_Struct *weapon_item) {
|
||||||
_ZP(Mob_GetWeaponDamageA);
|
|
||||||
int dmg = 0;
|
int dmg = 0;
|
||||||
int banedmg = 0;
|
int banedmg = 0;
|
||||||
|
|
||||||
@ -883,7 +882,6 @@ int Mob::GetWeaponDamage(Mob *against, const Item_Struct *weapon_item) {
|
|||||||
|
|
||||||
int Mob::GetWeaponDamage(Mob *against, const ItemInst *weapon_item, uint32 *hate)
|
int Mob::GetWeaponDamage(Mob *against, const ItemInst *weapon_item, uint32 *hate)
|
||||||
{
|
{
|
||||||
_ZP(Mob_GetWeaponDamageB);
|
|
||||||
int dmg = 0;
|
int dmg = 0;
|
||||||
int banedmg = 0;
|
int banedmg = 0;
|
||||||
|
|
||||||
@ -1104,9 +1102,6 @@ int Mob::GetWeaponDamage(Mob *against, const ItemInst *weapon_item, uint32 *hate
|
|||||||
// IsFromSpell added to allow spell effects to use Attack. (Mainly for the Rampage AA right now.)
|
// IsFromSpell added to allow spell effects to use Attack. (Mainly for the Rampage AA right now.)
|
||||||
bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool IsFromSpell, ExtraAttackOptions *opts)
|
bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool IsFromSpell, ExtraAttackOptions *opts)
|
||||||
{
|
{
|
||||||
|
|
||||||
_ZP(Client_Attack);
|
|
||||||
|
|
||||||
if (!other) {
|
if (!other) {
|
||||||
SetTarget(nullptr);
|
SetTarget(nullptr);
|
||||||
LogFile->write(EQEMuLog::Error, "A null Mob object was passed to Client::Attack() for evaluation!");
|
LogFile->write(EQEMuLog::Error, "A null Mob object was passed to Client::Attack() for evaluation!");
|
||||||
@ -1719,7 +1714,6 @@ bool Client::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_
|
|||||||
|
|
||||||
bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool IsFromSpell, ExtraAttackOptions *opts)
|
bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool IsFromSpell, ExtraAttackOptions *opts)
|
||||||
{
|
{
|
||||||
_ZP(NPC_Attack);
|
|
||||||
int damage = 0;
|
int damage = 0;
|
||||||
|
|
||||||
if (!other) {
|
if (!other) {
|
||||||
@ -2046,7 +2040,6 @@ void NPC::Damage(Mob* other, int32 damage, uint16 spell_id, SkillType attack_ski
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_skill) {
|
bool NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillType attack_skill) {
|
||||||
_ZP(NPC_Death);
|
|
||||||
mlog(COMBAT__HITS, "Fatal blow dealt by %s with %d damage, spell %d, skill %d", killerMob->GetName(), damage, spell, attack_skill);
|
mlog(COMBAT__HITS, "Fatal blow dealt by %s with %d damage, spell %d, skill %d", killerMob->GetName(), damage, spell, attack_skill);
|
||||||
|
|
||||||
Mob *oos = nullptr;
|
Mob *oos = nullptr;
|
||||||
@ -2550,7 +2543,6 @@ void Mob::AddToHateList(Mob* other, int32 hate, int32 damage, bool iYellForHelp,
|
|||||||
if(IsNPC() && other->IsClient() && other->CastToClient())
|
if(IsNPC() && other->IsClient() && other->CastToClient())
|
||||||
parse->EventNPC(EVENT_AGGRO, this->CastToNPC(), other, "", 0);
|
parse->EventNPC(EVENT_AGGRO, this->CastToNPC(), other, "", 0);
|
||||||
AI_Event_Engaged(other, iYellForHelp);
|
AI_Event_Engaged(other, iYellForHelp);
|
||||||
adverrorinfo = 8293;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2637,23 +2629,11 @@ void Mob::DamageShield(Mob* attacker, bool spell_ds) {
|
|||||||
mlog(COMBAT__HITS, "Applying Reverse Damage Shield of value %d to %s", rev_ds, attacker->GetName());
|
mlog(COMBAT__HITS, "Applying Reverse Damage Shield of value %d to %s", rev_ds, attacker->GetName());
|
||||||
attacker->Damage(this, -rev_ds, rev_ds_spell_id, ABJURE/*hackish*/, false); //"this" (us) will get the hate, etc. not sure how this works on Live, but it'll works for now, and tanks will love us for this
|
attacker->Damage(this, -rev_ds, rev_ds_spell_id, ABJURE/*hackish*/, false); //"this" (us) will get the hate, etc. not sure how this works on Live, but it'll works for now, and tanks will love us for this
|
||||||
//do we need to send a damage packet here also?
|
//do we need to send a damage packet here also?
|
||||||
/*
|
|
||||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_Damage, sizeof(CombatDamage_Struct));
|
|
||||||
CombatDamage_Struct* cds = (CombatDamage_Struct*)outapp->pBuffer;
|
|
||||||
cds->target = attacker->GetID();
|
|
||||||
cds->source = GetID();
|
|
||||||
cds->type = attacker->spellbonuses.ReverseDamageShieldType;
|
|
||||||
cds->spellid = 0x0;
|
|
||||||
cds->damage = rev_ds;
|
|
||||||
entity_list.QueueCloseClients(this, outapp);
|
|
||||||
safe_delete(outapp);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8 Mob::GetWeaponDamageBonus( const Item_Struct *Weapon )
|
uint8 Mob::GetWeaponDamageBonus( const Item_Struct *Weapon )
|
||||||
{
|
{
|
||||||
_ZP(Mob_GetWeaponDamageBonus);
|
|
||||||
// This function calculates and returns the damage bonus for the weapon identified by the parameter "Weapon".
|
// This function calculates and returns the damage bonus for the weapon identified by the parameter "Weapon".
|
||||||
// Modified 9/21/2008 by Cantus
|
// Modified 9/21/2008 by Cantus
|
||||||
|
|
||||||
@ -3855,7 +3835,6 @@ void Mob::TryDefensiveProc(const ItemInst* weapon, Mob *on, uint16 hand, int dam
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Mob::TryWeaponProc(const ItemInst* weapon_g, Mob *on, uint16 hand) {
|
void Mob::TryWeaponProc(const ItemInst* weapon_g, Mob *on, uint16 hand) {
|
||||||
_ZP(Mob_TryWeaponProcA);
|
|
||||||
if(!on) {
|
if(!on) {
|
||||||
SetTarget(nullptr);
|
SetTarget(nullptr);
|
||||||
LogFile->write(EQEMuLog::Error, "A null Mob object was passed to Mob::TryWeaponProc for evaluation!");
|
LogFile->write(EQEMuLog::Error, "A null Mob object was passed to Mob::TryWeaponProc for evaluation!");
|
||||||
@ -3914,7 +3893,6 @@ void Mob::TryWeaponProc(const ItemInst* weapon_g, Mob *on, uint16 hand) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Mob::TryWeaponProc(const ItemInst *inst, const Item_Struct* weapon, Mob *on, uint16 hand) {
|
void Mob::TryWeaponProc(const ItemInst *inst, const Item_Struct* weapon, Mob *on, uint16 hand) {
|
||||||
_ZP(Mob_TryWeaponProcB);
|
|
||||||
uint16 skillinuse = 28;
|
uint16 skillinuse = 28;
|
||||||
int ourlevel = GetLevel();
|
int ourlevel = GetLevel();
|
||||||
float ProcChance, ProcBonus;
|
float ProcChance, ProcBonus;
|
||||||
|
|||||||
@ -68,7 +68,6 @@ void NPC::CalcBonuses()
|
|||||||
|
|
||||||
void Client::CalcBonuses()
|
void Client::CalcBonuses()
|
||||||
{
|
{
|
||||||
_ZP(Client_CalcBonuses);
|
|
||||||
memset(&itembonuses, 0, sizeof(StatBonuses));
|
memset(&itembonuses, 0, sizeof(StatBonuses));
|
||||||
CalcItemBonuses(&itembonuses);
|
CalcItemBonuses(&itembonuses);
|
||||||
CalcEdibleBonuses(&itembonuses);
|
CalcEdibleBonuses(&itembonuses);
|
||||||
|
|||||||
13
zone/bot.cpp
13
zone/bot.cpp
@ -3048,8 +3048,6 @@ void Bot::SaveTimers() {
|
|||||||
|
|
||||||
bool Bot::Process()
|
bool Bot::Process()
|
||||||
{
|
{
|
||||||
_ZP(Bot_Process);
|
|
||||||
|
|
||||||
if(IsStunned() && stunned_timer.Check())
|
if(IsStunned() && stunned_timer.Check())
|
||||||
{
|
{
|
||||||
this->stunned = false;
|
this->stunned = false;
|
||||||
@ -3495,8 +3493,6 @@ float Bot::GetMaxMeleeRangeToTarget(Mob* target) {
|
|||||||
|
|
||||||
// AI Processing for the Bot object
|
// AI Processing for the Bot object
|
||||||
void Bot::AI_Process() {
|
void Bot::AI_Process() {
|
||||||
_ZP(Mob_BOT_Process);
|
|
||||||
|
|
||||||
if(!IsAIControlled())
|
if(!IsAIControlled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -3609,7 +3605,6 @@ void Bot::AI_Process() {
|
|||||||
|
|
||||||
if(IsEngaged())
|
if(IsEngaged())
|
||||||
{
|
{
|
||||||
_ZP(Mob_BOT_Process_IsEngaged);
|
|
||||||
|
|
||||||
if(rest_timer.Enabled())
|
if(rest_timer.Enabled())
|
||||||
rest_timer.Disable();
|
rest_timer.Disable();
|
||||||
@ -3956,7 +3951,6 @@ void Bot::AI_Process() {
|
|||||||
|
|
||||||
// AI Processing for a Bot object's pet
|
// AI Processing for a Bot object's pet
|
||||||
void Bot::PetAIProcess() {
|
void Bot::PetAIProcess() {
|
||||||
_ZP(Bot_PET_Process);
|
|
||||||
|
|
||||||
if( !HasPet() || !GetPet() || !GetPet()->IsNPC())
|
if( !HasPet() || !GetPet() || !GetPet()->IsNPC())
|
||||||
return;
|
return;
|
||||||
@ -3983,7 +3977,6 @@ void Bot::PetAIProcess() {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (IsEngaged()) {
|
if (IsEngaged()) {
|
||||||
_ZP(Bot_PET_Process_IsEngaged);
|
|
||||||
|
|
||||||
if (botPet->IsRooted())
|
if (botPet->IsRooted())
|
||||||
botPet->SetTarget(hate_list.GetClosest(botPet));
|
botPet->SetTarget(hate_list.GetClosest(botPet));
|
||||||
@ -6367,8 +6360,6 @@ void Bot::AddToHateList(Mob* other, int32 hate, int32 damage, bool iYellForHelp,
|
|||||||
|
|
||||||
bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, bool IsFromSpell, ExtraAttackOptions *opts)
|
bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, bool IsFromSpell, ExtraAttackOptions *opts)
|
||||||
{
|
{
|
||||||
_ZP(Bot_Attack);
|
|
||||||
|
|
||||||
if (!other) {
|
if (!other) {
|
||||||
SetTarget(nullptr);
|
SetTarget(nullptr);
|
||||||
LogFile->write(EQEMuLog::Error, "A null Mob object was passed to Bot::Attack for evaluation!");
|
LogFile->write(EQEMuLog::Error, "A null Mob object was passed to Bot::Attack for evaluation!");
|
||||||
@ -8669,8 +8660,6 @@ void Bot::AI_Stop() {
|
|||||||
//iOther the mob who is doing the looking. It should figure out
|
//iOther the mob who is doing the looking. It should figure out
|
||||||
//what iOther thinks about 'this'
|
//what iOther thinks about 'this'
|
||||||
FACTION_VALUE Bot::GetReverseFactionCon(Mob* iOther) {
|
FACTION_VALUE Bot::GetReverseFactionCon(Mob* iOther) {
|
||||||
_ZP(Bot_GetReverseFactionCon);
|
|
||||||
|
|
||||||
if(iOther->IsBot()) {
|
if(iOther->IsBot()) {
|
||||||
return FACTION_ALLY;
|
return FACTION_ALLY;
|
||||||
}
|
}
|
||||||
@ -9598,7 +9587,6 @@ bool Bot::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot, int32 cast_t
|
|||||||
bool Result = false;
|
bool Result = false;
|
||||||
|
|
||||||
if(zone && !zone->IsSpellBlocked(spell_id, GetX(), GetY(), GetZ())) {
|
if(zone && !zone->IsSpellBlocked(spell_id, GetX(), GetY(), GetZ())) {
|
||||||
_ZP(Bot_CastSpell);
|
|
||||||
|
|
||||||
mlog(SPELLS__CASTING, "CastSpell called for spell %s (%d) on entity %d, slot %d, time %d, mana %d, from item slot %d",
|
mlog(SPELLS__CASTING, "CastSpell called for spell %s (%d) on entity %d, slot %d, time %d, mana %d, from item slot %d",
|
||||||
spells[spell_id].name, spell_id, target_id, slot, cast_time, mana_cost, (item_slot==0xFFFFFFFF)?999:item_slot);
|
spells[spell_id].name, spell_id, target_id, slot, cast_time, mana_cost, (item_slot==0xFFFFFFFF)?999:item_slot);
|
||||||
@ -15997,7 +15985,6 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) {
|
|||||||
// This function has been reworked for the caster bots, when engaged.
|
// This function has been reworked for the caster bots, when engaged.
|
||||||
// Healers bots must heal thoses who loose HP.
|
// Healers bots must heal thoses who loose HP.
|
||||||
bool EntityList::Bot_AICheckCloseBeneficialSpells(Bot* caster, uint8 iChance, float iRange, uint16 iSpellTypes) {
|
bool EntityList::Bot_AICheckCloseBeneficialSpells(Bot* caster, uint8 iChance, float iRange, uint16 iSpellTypes) {
|
||||||
_ZP(EntityList_Bot_AICheckCloseBeneficialSpells);
|
|
||||||
|
|
||||||
if((iSpellTypes&SpellTypes_Detrimental) != 0) {
|
if((iSpellTypes&SpellTypes_Detrimental) != 0) {
|
||||||
//according to live, you can buff and heal through walls...
|
//according to live, you can buff and heal through walls...
|
||||||
|
|||||||
@ -4,7 +4,6 @@
|
|||||||
#include "../common/StringUtil.h"
|
#include "../common/StringUtil.h"
|
||||||
|
|
||||||
bool Bot::AICastSpell(Mob* tar, uint8 iChance, uint16 iSpellTypes) {
|
bool Bot::AICastSpell(Mob* tar, uint8 iChance, uint16 iSpellTypes) {
|
||||||
_ZP(Bot_AICastSpell);
|
|
||||||
|
|
||||||
if (!tar) {
|
if (!tar) {
|
||||||
return false;
|
return false;
|
||||||
@ -856,7 +855,6 @@ bool Bot::AI_PursueCastCheck() {
|
|||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
if (AIautocastspell_timer->Check(false)) {
|
if (AIautocastspell_timer->Check(false)) {
|
||||||
_ZP(Bot_AI_Process_pursue_cast);
|
|
||||||
|
|
||||||
AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting.
|
AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting.
|
||||||
|
|
||||||
@ -887,7 +885,6 @@ bool Bot::AI_IdleCastCheck() {
|
|||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
if (AIautocastspell_timer->Check(false)) {
|
if (AIautocastspell_timer->Check(false)) {
|
||||||
_ZP(Bot_AI_IdleCastCheck);
|
|
||||||
#if MobAI_DEBUG_Spells >= 25
|
#if MobAI_DEBUG_Spells >= 25
|
||||||
cout << "Non-Engaged autocast check triggered: " << this->GetCleanName() << endl;
|
cout << "Non-Engaged autocast check triggered: " << this->GetCleanName() << endl;
|
||||||
#endif
|
#endif
|
||||||
@ -957,7 +954,6 @@ bool Bot::AI_EngagedCastCheck() {
|
|||||||
bool failedToCast = false;
|
bool failedToCast = false;
|
||||||
|
|
||||||
if (GetTarget() && AIautocastspell_timer->Check(false)) {
|
if (GetTarget() && AIautocastspell_timer->Check(false)) {
|
||||||
_ZP(Bot_AI_Process_engaged_cast);
|
|
||||||
|
|
||||||
AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting.
|
AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting.
|
||||||
|
|
||||||
|
|||||||
@ -488,7 +488,6 @@ bool Client::Save(uint8 iCommitNow) {
|
|||||||
|
|
||||||
if(!ClientDataLoaded())
|
if(!ClientDataLoaded())
|
||||||
return false;
|
return false;
|
||||||
_ZP(Client_Save);
|
|
||||||
|
|
||||||
m_pp.x = x_pos;
|
m_pp.x = x_pos;
|
||||||
m_pp.y = y_pos;
|
m_pp.y = y_pos;
|
||||||
@ -698,16 +697,6 @@ bool Client::SendAllPackets() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Client::QueuePacket(const EQApplicationPacket* app, bool ack_req, CLIENT_CONN_STATUS required_state, eqFilterType filter) {
|
void Client::QueuePacket(const EQApplicationPacket* app, bool ack_req, CLIENT_CONN_STATUS required_state, eqFilterType filter) {
|
||||||
/* if (app->opcode==0x9999) {
|
|
||||||
cout << "Sending an unknown opcode from: " << endl;
|
|
||||||
print_stacktrace();
|
|
||||||
}
|
|
||||||
if (app->opcode==OP_SkillUpdate) {
|
|
||||||
cout << "Sending OP_SkillUpdate from: " << endl;
|
|
||||||
print_stacktrace();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
_ZP(Client_QueuePacket);
|
|
||||||
if(filter!=FilterNone){
|
if(filter!=FilterNone){
|
||||||
//this is incomplete... no support for FilterShowGroupOnly or FilterShowSelfOnly
|
//this is incomplete... no support for FilterShowGroupOnly or FilterShowSelfOnly
|
||||||
if(GetFilter(filter) == FilterHide)
|
if(GetFilter(filter) == FilterHide)
|
||||||
@ -723,7 +712,6 @@ void Client::QueuePacket(const EQApplicationPacket* app, bool ack_req, CLIENT_CO
|
|||||||
{
|
{
|
||||||
// todo: save packets for later use
|
// todo: save packets for later use
|
||||||
AddPacket(app, ack_req);
|
AddPacket(app, ack_req);
|
||||||
// LogFile->write(EQEMuLog::Normal, "Adding Packet to list (%d) (%d)", app->GetOpcode(), (int)required_state);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if(eqs)
|
if(eqs)
|
||||||
@ -7363,12 +7351,9 @@ FACTION_VALUE Client::GetReverseFactionCon(Mob* iOther) {
|
|||||||
//o--------------------------------------------------------------
|
//o--------------------------------------------------------------
|
||||||
FACTION_VALUE Client::GetFactionLevel(uint32 char_id, uint32 npc_id, uint32 p_race, uint32 p_class, uint32 p_deity, int32 pFaction, Mob* tnpc)
|
FACTION_VALUE Client::GetFactionLevel(uint32 char_id, uint32 npc_id, uint32 p_race, uint32 p_class, uint32 p_deity, int32 pFaction, Mob* tnpc)
|
||||||
{
|
{
|
||||||
_ZP(Client_GetFactionLevel);
|
|
||||||
|
|
||||||
if (pFaction < 0)
|
if (pFaction < 0)
|
||||||
return GetSpecialFactionCon(tnpc);
|
return GetSpecialFactionCon(tnpc);
|
||||||
FACTION_VALUE fac = FACTION_INDIFFERENT;
|
FACTION_VALUE fac = FACTION_INDIFFERENT;
|
||||||
//int32 pFacValue; -Trumpcard: commenting. Not currently used.
|
|
||||||
int32 tmpFactionValue;
|
int32 tmpFactionValue;
|
||||||
FactionMods fmods;
|
FactionMods fmods;
|
||||||
|
|
||||||
@ -7424,7 +7409,6 @@ FACTION_VALUE Client::GetFactionLevel(uint32 char_id, uint32 npc_id, uint32 p_ra
|
|||||||
//o--------------------------------------------------------------
|
//o--------------------------------------------------------------
|
||||||
void Client::SetFactionLevel(uint32 char_id, uint32 npc_id, uint8 char_class, uint8 char_race, uint8 char_deity)
|
void Client::SetFactionLevel(uint32 char_id, uint32 npc_id, uint8 char_class, uint8 char_race, uint8 char_deity)
|
||||||
{
|
{
|
||||||
_ZP(Client_SetFactionLevel);
|
|
||||||
int32 faction_id[MAX_NPC_FACTIONS]={ 0,0,0,0,0,0,0,0,0,0 };
|
int32 faction_id[MAX_NPC_FACTIONS]={ 0,0,0,0,0,0,0,0,0,0 };
|
||||||
int32 npc_value[MAX_NPC_FACTIONS]={ 0,0,0,0,0,0,0,0,0,0 };
|
int32 npc_value[MAX_NPC_FACTIONS]={ 0,0,0,0,0,0,0,0,0,0 };
|
||||||
uint8 temp[MAX_NPC_FACTIONS]={ 0,0,0,0,0,0,0,0,0,0 };
|
uint8 temp[MAX_NPC_FACTIONS]={ 0,0,0,0,0,0,0,0,0,0 };
|
||||||
@ -7517,7 +7501,6 @@ void Client::SetFactionLevel(uint32 char_id, uint32 npc_id, uint8 char_class, ui
|
|||||||
|
|
||||||
void Client::SetFactionLevel2(uint32 char_id, int32 faction_id, uint8 char_class, uint8 char_race, uint8 char_deity, int32 value, uint8 temp)
|
void Client::SetFactionLevel2(uint32 char_id, int32 faction_id, uint8 char_class, uint8 char_race, uint8 char_deity, int32 value, uint8 temp)
|
||||||
{
|
{
|
||||||
_ZP(Client_SetFactionLevel2);
|
|
||||||
int32 current_value;
|
int32 current_value;
|
||||||
//Get the npc faction list
|
//Get the npc faction list
|
||||||
if(faction_id > 0 && value != 0) {
|
if(faction_id > 0 && value != 0) {
|
||||||
@ -7562,7 +7545,6 @@ bool Client::HatedByClass(uint32 p_race, uint32 p_class, uint32 p_deity, int32 p
|
|||||||
{
|
{
|
||||||
|
|
||||||
bool Result = false;
|
bool Result = false;
|
||||||
_ZP(Client_GetFactionLevel);
|
|
||||||
|
|
||||||
int32 tmpFactionValue;
|
int32 tmpFactionValue;
|
||||||
FactionMods fmods;
|
FactionMods fmods;
|
||||||
|
|||||||
@ -401,8 +401,6 @@ void ClearMappedOpcode(EmuOpcode op) {
|
|||||||
|
|
||||||
int Client::HandlePacket(const EQApplicationPacket *app)
|
int Client::HandlePacket(const EQApplicationPacket *app)
|
||||||
{
|
{
|
||||||
_ZP(Client_HandlePacket);
|
|
||||||
|
|
||||||
if(is_log_enabled(CLIENT__NET_IN_TRACE)) {
|
if(is_log_enabled(CLIENT__NET_IN_TRACE)) {
|
||||||
char buffer[64];
|
char buffer[64];
|
||||||
app->build_header_dump(buffer);
|
app->build_header_dump(buffer);
|
||||||
|
|||||||
@ -71,8 +71,6 @@ extern PetitionList petition_list;
|
|||||||
extern EntityList entity_list;
|
extern EntityList entity_list;
|
||||||
|
|
||||||
bool Client::Process() {
|
bool Client::Process() {
|
||||||
_ZP(Client_Process);
|
|
||||||
adverrorinfo = 1;
|
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
|
|
||||||
if(Connected() || IsLD())
|
if(Connected() || IsLD())
|
||||||
@ -523,7 +521,6 @@ bool Client::Process() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
adverrorinfo = 2;
|
|
||||||
if (position_timer.Check()) {
|
if (position_timer.Check()) {
|
||||||
if (IsAIControlled())
|
if (IsAIControlled())
|
||||||
{
|
{
|
||||||
@ -599,9 +596,7 @@ bool Client::Process() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
adverrorinfo = 3;
|
|
||||||
SpellProcess();
|
SpellProcess();
|
||||||
adverrorinfo = 4;
|
|
||||||
if (endupkeep_timer.Check() && !dead){
|
if (endupkeep_timer.Check() && !dead){
|
||||||
DoEnduranceUpkeep();
|
DoEnduranceUpkeep();
|
||||||
}
|
}
|
||||||
@ -690,8 +685,6 @@ bool Client::Process() {
|
|||||||
|
|
||||||
|
|
||||||
/************ Get all packets from packet manager out queue and process them ************/
|
/************ Get all packets from packet manager out queue and process them ************/
|
||||||
adverrorinfo = 5;
|
|
||||||
|
|
||||||
EQApplicationPacket *app = nullptr;
|
EQApplicationPacket *app = nullptr;
|
||||||
if(!eqs->CheckState(CLOSING))
|
if(!eqs->CheckState(CLOSING))
|
||||||
{
|
{
|
||||||
@ -721,24 +714,21 @@ bool Client::Process() {
|
|||||||
{
|
{
|
||||||
GetMerc()->Depop();
|
GetMerc()->Depop();
|
||||||
}
|
}
|
||||||
adverrorinfo = 811;
|
|
||||||
client_state = CLIENT_LINKDEAD;
|
client_state = CLIENT_LINKDEAD;
|
||||||
if (/*!loggedin || */zoning || instalog || GetGM())
|
if (zoning || instalog || GetGM())
|
||||||
{
|
{
|
||||||
adverrorinfo = 811;
|
|
||||||
Group *mygroup = GetGroup();
|
Group *mygroup = GetGroup();
|
||||||
if (mygroup)
|
if (mygroup)
|
||||||
{
|
{
|
||||||
adverrorinfo = 812;
|
|
||||||
if (!zoning) {
|
if (!zoning) {
|
||||||
entity_list.MessageGroup(this,true,15,"%s logged out.",GetName());
|
entity_list.MessageGroup(this, true, 15, "%s logged out.", GetName());
|
||||||
mygroup->DelMember(this);
|
mygroup->DelMember(this);
|
||||||
} else {
|
} else {
|
||||||
entity_list.MessageGroup(this,true,15,"%s left the zone.",GetName());
|
entity_list.MessageGroup(this, true, 15, "%s left the zone.", GetName());
|
||||||
mygroup->MemberZoned(this);
|
mygroup->MemberZoned(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
adverrorinfo = 813;
|
|
||||||
}
|
}
|
||||||
Raid *myraid = entity_list.GetRaidByClient(this);
|
Raid *myraid = entity_list.GetRaidByClient(this);
|
||||||
if (myraid)
|
if (myraid)
|
||||||
@ -757,7 +747,6 @@ bool Client::Process() {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
adverrorinfo = 814;
|
|
||||||
LinkDead();
|
LinkDead();
|
||||||
}
|
}
|
||||||
OnDisconnect(true);
|
OnDisconnect(true);
|
||||||
@ -766,7 +755,7 @@ bool Client::Process() {
|
|||||||
if (forget_timer.Check()) {
|
if (forget_timer.Check()) {
|
||||||
forget_timer.Disable();
|
forget_timer.Disable();
|
||||||
entity_list.ClearZoneFeignAggro(this);
|
entity_list.ClearZoneFeignAggro(this);
|
||||||
Message(0,"Your enemies have forgotten you!");
|
Message(0, "Your enemies have forgotten you!");
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@ -565,9 +565,6 @@ int command_add(const char *command_string, const char *desc, int access, CmdFun
|
|||||||
*/
|
*/
|
||||||
int command_realdispatch(Client *c, const char *message)
|
int command_realdispatch(Client *c, const char *message)
|
||||||
{
|
{
|
||||||
_ZP(command_realdispatch);
|
|
||||||
|
|
||||||
|
|
||||||
Seperator sep(message, ' ', 10, 100, true); // "three word argument" should be considered 1 arg
|
Seperator sep(message, ' ', 10, 100, true); // "three word argument" should be considered 1 arg
|
||||||
|
|
||||||
command_logcommand(c, message);
|
command_logcommand(c, message);
|
||||||
|
|||||||
@ -323,7 +323,7 @@ void EntityList::AddClient(Client* client) {
|
|||||||
void EntityList::TrapProcess() {
|
void EntityList::TrapProcess() {
|
||||||
if(numclients < 1)
|
if(numclients < 1)
|
||||||
return;
|
return;
|
||||||
_ZP(EntityList_TrapProcess);
|
|
||||||
LinkedListIterator<Trap*> iterator(trap_list);
|
LinkedListIterator<Trap*> iterator(trap_list);
|
||||||
iterator.Reset();
|
iterator.Reset();
|
||||||
uint32 count=0;
|
uint32 count=0;
|
||||||
@ -363,7 +363,6 @@ void EntityList::GroupProcess() {
|
|||||||
|
|
||||||
if(numclients < 1)
|
if(numclients < 1)
|
||||||
return;
|
return;
|
||||||
_ZP(EntityList_GroupProcess);
|
|
||||||
|
|
||||||
iterator = group_list.begin();
|
iterator = group_list.begin();
|
||||||
while(iterator != group_list.end())
|
while(iterator != group_list.end())
|
||||||
@ -392,8 +391,6 @@ void EntityList::QueueToGroupsForNPCHealthAA(Mob* sender, const EQApplicationPac
|
|||||||
|
|
||||||
std::list<Group *>::iterator iterator = group_list.begin();
|
std::list<Group *>::iterator iterator = group_list.begin();
|
||||||
|
|
||||||
_ZP(EntityList_QueueToGroupsForNPCHealthAA);
|
|
||||||
|
|
||||||
while(iterator != group_list.end())
|
while(iterator != group_list.end())
|
||||||
{
|
{
|
||||||
(*iterator)->QueueHPPacketsForNPCHealthAA(sender, app);
|
(*iterator)->QueueHPPacketsForNPCHealthAA(sender, app);
|
||||||
@ -407,7 +404,6 @@ void EntityList::RaidProcess() {
|
|||||||
|
|
||||||
if(numclients < 1)
|
if(numclients < 1)
|
||||||
return;
|
return;
|
||||||
_ZP(EntityList_RaidProcess);
|
|
||||||
|
|
||||||
iterator = raid_list.begin();
|
iterator = raid_list.begin();
|
||||||
while(iterator != raid_list.end())
|
while(iterator != raid_list.end())
|
||||||
@ -425,7 +421,6 @@ void EntityList::DoorProcess() {
|
|||||||
if(numclients < 1)
|
if(numclients < 1)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
_ZP(EntityList_DoorProcess);
|
|
||||||
LinkedListIterator<Doors*> iterator(door_list);
|
LinkedListIterator<Doors*> iterator(door_list);
|
||||||
iterator.Reset();
|
iterator.Reset();
|
||||||
uint32 count=0;
|
uint32 count=0;
|
||||||
@ -443,7 +438,6 @@ void EntityList::DoorProcess() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EntityList::ObjectProcess() {
|
void EntityList::ObjectProcess() {
|
||||||
_ZP(EntityList_ObjectProcess);
|
|
||||||
LinkedListIterator<Object*> iterator(object_list);
|
LinkedListIterator<Object*> iterator(object_list);
|
||||||
iterator.Reset();
|
iterator.Reset();
|
||||||
uint32 count=0;
|
uint32 count=0;
|
||||||
@ -461,7 +455,6 @@ void EntityList::ObjectProcess() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EntityList::CorpseProcess() {
|
void EntityList::CorpseProcess() {
|
||||||
_ZP(EntityList_CorpseProcess);
|
|
||||||
LinkedListIterator<Corpse*> iterator(corpse_list);
|
LinkedListIterator<Corpse*> iterator(corpse_list);
|
||||||
iterator.Reset();
|
iterator.Reset();
|
||||||
uint32 count=0;
|
uint32 count=0;
|
||||||
@ -483,7 +476,6 @@ void EntityList::MobProcess() {
|
|||||||
if(numclients < 1)
|
if(numclients < 1)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
_ZP(EntityList_MobProcess);
|
|
||||||
LinkedListIterator<Mob*> iterator(mob_list);
|
LinkedListIterator<Mob*> iterator(mob_list);
|
||||||
iterator.Reset();
|
iterator.Reset();
|
||||||
while(iterator.MoreElements())
|
while(iterator.MoreElements())
|
||||||
@ -532,7 +524,6 @@ void EntityList::MobProcess() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EntityList::BeaconProcess() {
|
void EntityList::BeaconProcess() {
|
||||||
_ZP(EntityList_BeaconProcess);
|
|
||||||
LinkedListIterator<Beacon *> iterator(beacon_list);
|
LinkedListIterator<Beacon *> iterator(beacon_list);
|
||||||
int count;
|
int count;
|
||||||
|
|
||||||
@ -2626,7 +2617,6 @@ void EntityList::RemoveEntity(uint16 id)
|
|||||||
|
|
||||||
void EntityList::Process()
|
void EntityList::Process()
|
||||||
{
|
{
|
||||||
_ZP(EntityList_Process);
|
|
||||||
CheckSpawnQueue();
|
CheckSpawnQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,6 @@
|
|||||||
|
|
||||||
#include "../common/rulesys.h"
|
#include "../common/rulesys.h"
|
||||||
#include "../common/MiscFunctions.h"
|
#include "../common/MiscFunctions.h"
|
||||||
#include "zone_profile.h"
|
|
||||||
#include "map.h"
|
#include "map.h"
|
||||||
#include "zone.h"
|
#include "zone.h"
|
||||||
#include "pathing.h"
|
#include "pathing.h"
|
||||||
|
|||||||
@ -80,7 +80,6 @@ bool HateList::IsOnHateList(Mob *mob)
|
|||||||
|
|
||||||
tHateEntry *HateList::Find(Mob *ent)
|
tHateEntry *HateList::Find(Mob *ent)
|
||||||
{
|
{
|
||||||
_ZP(HateList_Find);
|
|
||||||
auto iterator = list.begin();
|
auto iterator = list.begin();
|
||||||
while(iterator != list.end())
|
while(iterator != list.end())
|
||||||
{
|
{
|
||||||
@ -105,7 +104,6 @@ void HateList::Set(Mob* other, uint32 in_hate, uint32 in_dam)
|
|||||||
|
|
||||||
Mob* HateList::GetDamageTop(Mob* hater)
|
Mob* HateList::GetDamageTop(Mob* hater)
|
||||||
{
|
{
|
||||||
_ZP(HateList_GetDamageTop);
|
|
||||||
Mob* current = nullptr;
|
Mob* current = nullptr;
|
||||||
Group* grp = nullptr;
|
Group* grp = nullptr;
|
||||||
Raid* r = nullptr;
|
Raid* r = nullptr;
|
||||||
@ -149,7 +147,6 @@ Mob* HateList::GetDamageTop(Mob* hater)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Mob* HateList::GetClosest(Mob *hater) {
|
Mob* HateList::GetClosest(Mob *hater) {
|
||||||
_ZP(HateList_GetClosest);
|
|
||||||
Mob* close = nullptr;
|
Mob* close = nullptr;
|
||||||
float closedist = 99999.9f;
|
float closedist = 99999.9f;
|
||||||
float thisdist;
|
float thisdist;
|
||||||
@ -229,7 +226,6 @@ bool HateList::RemoveEnt(Mob *ent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void HateList::DoFactionHits(int32 nfl_id) {
|
void HateList::DoFactionHits(int32 nfl_id) {
|
||||||
_ZP(HateList_DoFactionHits);
|
|
||||||
if (nfl_id <= 0)
|
if (nfl_id <= 0)
|
||||||
return;
|
return;
|
||||||
auto iterator = list.begin();
|
auto iterator = list.begin();
|
||||||
@ -250,7 +246,6 @@ void HateList::DoFactionHits(int32 nfl_id) {
|
|||||||
|
|
||||||
Mob *HateList::GetTop(Mob *center)
|
Mob *HateList::GetTop(Mob *center)
|
||||||
{
|
{
|
||||||
_ZP(HateList_GetTop);
|
|
||||||
Mob* top = nullptr;
|
Mob* top = nullptr;
|
||||||
int32 hate = -1;
|
int32 hate = -1;
|
||||||
|
|
||||||
@ -406,8 +401,6 @@ Mob *HateList::GetTop(Mob *center)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Mob *HateList::GetMostHate(){
|
Mob *HateList::GetMostHate(){
|
||||||
_ZP(HateList_GetMostHate);
|
|
||||||
|
|
||||||
Mob* top = nullptr;
|
Mob* top = nullptr;
|
||||||
int32 hate = -1;
|
int32 hate = -1;
|
||||||
|
|
||||||
@ -453,8 +446,6 @@ int32 HateList::GetEntHate(Mob *ent, bool damage)
|
|||||||
|
|
||||||
//looking for any mob with hate > -1
|
//looking for any mob with hate > -1
|
||||||
bool HateList::IsEmpty() {
|
bool HateList::IsEmpty() {
|
||||||
_ZP(HateList_IsEmpty);
|
|
||||||
|
|
||||||
return(list.size() == 0);
|
return(list.size() == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,9 +29,6 @@
|
|||||||
|
|
||||||
// Queries the loottable: adds item & coin to the npc
|
// Queries the loottable: adds item & coin to the npc
|
||||||
void ZoneDatabase::AddLootTableToNPC(NPC* npc,uint32 loottable_id, ItemList* itemlist, uint32* copper, uint32* silver, uint32* gold, uint32* plat) {
|
void ZoneDatabase::AddLootTableToNPC(NPC* npc,uint32 loottable_id, ItemList* itemlist, uint32* copper, uint32* silver, uint32* gold, uint32* plat) {
|
||||||
_ZP(Database_AddLootTableToNPC);
|
|
||||||
//if (loottable_id == 178190)
|
|
||||||
//DebugBreak();
|
|
||||||
const LootTable_Struct* lts = 0;
|
const LootTable_Struct* lts = 0;
|
||||||
*copper = 0;
|
*copper = 0;
|
||||||
*silver = 0;
|
*silver = 0;
|
||||||
|
|||||||
@ -1204,27 +1204,27 @@ void Lua_Client::QueuePacket(Lua_Packet app, bool ack_req, int client_connection
|
|||||||
self->QueuePacket(app, ack_req, static_cast<Mob::CLIENT_CONN_STATUS>(client_connection_status), static_cast<eqFilterType>(filter));
|
self->QueuePacket(app, ack_req, static_cast<Mob::CLIENT_CONN_STATUS>(client_connection_status), static_cast<eqFilterType>(filter));
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 Lua_Client::GetHunger() {
|
int Lua_Client::GetHunger() {
|
||||||
Lua_Safe_Call_Int();
|
Lua_Safe_Call_Int();
|
||||||
return self->GetHunger();
|
return self->GetHunger();
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 Lua_Client::GetThirst() {
|
int Lua_Client::GetThirst() {
|
||||||
Lua_Safe_Call_Int();
|
Lua_Safe_Call_Int();
|
||||||
return self->GetThirst();
|
return self->GetThirst();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Lua_Client::SetHunger(int32 in_hunger) {
|
void Lua_Client::SetHunger(int in_hunger) {
|
||||||
Lua_Safe_Call_Void();
|
Lua_Safe_Call_Void();
|
||||||
self->SetHunger(in_hunger);
|
self->SetHunger(in_hunger);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Lua_Client::SetThirst(int32 in_thirst) {
|
void Lua_Client::SetThirst(int in_thirst) {
|
||||||
Lua_Safe_Call_Void();
|
Lua_Safe_Call_Void();
|
||||||
self->SetThirst(in_thirst);
|
self->SetThirst(in_thirst);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Lua_Client::SetConsumption(int32 in_hunger, int32 in_thirst) {
|
void Lua_Client::SetConsumption(int in_hunger, int in_thirst) {
|
||||||
Lua_Safe_Call_Void();
|
Lua_Safe_Call_Void();
|
||||||
self->SetConsumption(in_hunger, in_thirst);
|
self->SetConsumption(in_hunger, in_thirst);
|
||||||
}
|
}
|
||||||
@ -1469,11 +1469,11 @@ luabind::scope lua_register_client() {
|
|||||||
.def("QueuePacket", (void(Lua_Client::*)(Lua_Packet,bool))&Lua_Client::QueuePacket)
|
.def("QueuePacket", (void(Lua_Client::*)(Lua_Packet,bool))&Lua_Client::QueuePacket)
|
||||||
.def("QueuePacket", (void(Lua_Client::*)(Lua_Packet,bool,int))&Lua_Client::QueuePacket)
|
.def("QueuePacket", (void(Lua_Client::*)(Lua_Packet,bool,int))&Lua_Client::QueuePacket)
|
||||||
.def("QueuePacket", (void(Lua_Client::*)(Lua_Packet,bool,int,int))&Lua_Client::QueuePacket)
|
.def("QueuePacket", (void(Lua_Client::*)(Lua_Packet,bool,int,int))&Lua_Client::QueuePacket)
|
||||||
.def("GetHunger", (int32(Lua_Client::*)(void))&Lua_Client::GetHunger)
|
.def("GetHunger", (int(Lua_Client::*)(void))&Lua_Client::GetHunger)
|
||||||
.def("GetThirst", (int32(Lua_Client::*)(void))&Lua_Client::GetThirst)
|
.def("GetThirst", (int(Lua_Client::*)(void))&Lua_Client::GetThirst)
|
||||||
.def("SetHunger", (void(Lua_Client::*)(int32))&Lua_Client::SetHunger)
|
.def("SetHunger", (void(Lua_Client::*)(int))&Lua_Client::SetHunger)
|
||||||
.def("SetThirst", (void(Lua_Client::*)(int32))&Lua_Client::SetThirst)
|
.def("SetThirst", (void(Lua_Client::*)(int))&Lua_Client::SetThirst)
|
||||||
.def("SetConsumption", (void(Lua_Client::*)(int32, int32))&Lua_Client::SetConsumption);
|
.def("SetConsumption", (void(Lua_Client::*)(int, int))&Lua_Client::SetConsumption);
|
||||||
}
|
}
|
||||||
|
|
||||||
luabind::scope lua_register_inventory_where() {
|
luabind::scope lua_register_inventory_where() {
|
||||||
|
|||||||
@ -268,11 +268,11 @@ public:
|
|||||||
void QueuePacket(Lua_Packet app, bool ack_req);
|
void QueuePacket(Lua_Packet app, bool ack_req);
|
||||||
void QueuePacket(Lua_Packet app, bool ack_req, int client_connection_status);
|
void QueuePacket(Lua_Packet app, bool ack_req, int client_connection_status);
|
||||||
void QueuePacket(Lua_Packet app, bool ack_req, int client_connection_status, int filter);
|
void QueuePacket(Lua_Packet app, bool ack_req, int client_connection_status, int filter);
|
||||||
int32 GetHunger();
|
int GetHunger();
|
||||||
int32 GetThirst();
|
int GetThirst();
|
||||||
void SetHunger(int32 in_hunger);
|
void SetHunger(int in_hunger);
|
||||||
void SetThirst(int32 in_thirst);
|
void SetThirst(int in_thirst);
|
||||||
void SetConsumption(int32 in_hunger, int32 in_thirst);
|
void SetConsumption(int in_hunger, int in_thirst);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -81,20 +81,14 @@ Merc::~Merc() {
|
|||||||
|
|
||||||
void Merc::CalcBonuses()
|
void Merc::CalcBonuses()
|
||||||
{
|
{
|
||||||
//_ZP(Merc_CalcBonuses);
|
|
||||||
memset(&itembonuses, 0, sizeof(StatBonuses));
|
memset(&itembonuses, 0, sizeof(StatBonuses));
|
||||||
memset(&aabonuses, 0, sizeof(StatBonuses));
|
memset(&aabonuses, 0, sizeof(StatBonuses));
|
||||||
CalcItemBonuses(&itembonuses);
|
CalcItemBonuses(&itembonuses);
|
||||||
|
|
||||||
CalcSpellBonuses(&spellbonuses);
|
CalcSpellBonuses(&spellbonuses);
|
||||||
|
|
||||||
//_log(AA__BONUSES, "Calculating AA Bonuses for %s.", this->GetCleanName());
|
|
||||||
//CalcAABonuses(&aabonuses); //we're not quite ready for this
|
|
||||||
//_log(AA__BONUSES, "Finished calculating AA Bonuses for %s.", this->GetCleanName());
|
|
||||||
|
|
||||||
CalcAC();
|
CalcAC();
|
||||||
CalcATK();
|
CalcATK();
|
||||||
//CalcHaste();
|
|
||||||
|
|
||||||
CalcSTR();
|
CalcSTR();
|
||||||
CalcSTA();
|
CalcSTA();
|
||||||
@ -1500,8 +1494,6 @@ void Merc::AI_Process() {
|
|||||||
|
|
||||||
if(IsEngaged())
|
if(IsEngaged())
|
||||||
{
|
{
|
||||||
_ZP(Mob_BOT_Process_IsEngaged);
|
|
||||||
|
|
||||||
if(rest_timer.Enabled())
|
if(rest_timer.Enabled())
|
||||||
rest_timer.Disable();
|
rest_timer.Disable();
|
||||||
|
|
||||||
@ -1868,7 +1860,6 @@ bool Merc::AI_EngagedCastCheck() {
|
|||||||
bool failedToCast = false;
|
bool failedToCast = false;
|
||||||
|
|
||||||
if (GetTarget() && AIautocastspell_timer->Check(false)) {
|
if (GetTarget() && AIautocastspell_timer->Check(false)) {
|
||||||
_ZP(Merc_AI_Process_engaged_cast);
|
|
||||||
|
|
||||||
AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting.
|
AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting.
|
||||||
|
|
||||||
@ -1926,7 +1917,6 @@ bool Merc::AI_IdleCastCheck() {
|
|||||||
bool failedToCast = false;
|
bool failedToCast = false;
|
||||||
|
|
||||||
if (AIautocastspell_timer->Check(false)) {
|
if (AIautocastspell_timer->Check(false)) {
|
||||||
_ZP(Merc_AI_IdleCastCheck);
|
|
||||||
#if MobAI_DEBUG_Spells >= 25
|
#if MobAI_DEBUG_Spells >= 25
|
||||||
std::cout << "Non-Engaged autocast check triggered: " << this->GetCleanName() << std::endl;
|
std::cout << "Non-Engaged autocast check triggered: " << this->GetCleanName() << std::endl;
|
||||||
#endif
|
#endif
|
||||||
@ -1973,7 +1963,6 @@ bool Merc::AI_IdleCastCheck() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool EntityList::Merc_AICheckCloseBeneficialSpells(Merc* caster, uint8 iChance, float iRange, uint32 iSpellTypes) {
|
bool EntityList::Merc_AICheckCloseBeneficialSpells(Merc* caster, uint8 iChance, float iRange, uint32 iSpellTypes) {
|
||||||
_ZP(EntityList_Merc_AICheckCloseBeneficialSpells);
|
|
||||||
|
|
||||||
if((iSpellTypes&SpellTypes_Detrimental) != 0) {
|
if((iSpellTypes&SpellTypes_Detrimental) != 0) {
|
||||||
//according to live, you can buff and heal through walls...
|
//according to live, you can buff and heal through walls...
|
||||||
@ -2083,7 +2072,6 @@ bool Merc::AIDoSpellCast(uint16 spellid, Mob* tar, int32 mana_cost, uint32* oDon
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Merc::AICastSpell(int8 iChance, int32 iSpellTypes) {
|
bool Merc::AICastSpell(int8 iChance, int32 iSpellTypes) {
|
||||||
_ZP(Bot_AICastSpell);
|
|
||||||
|
|
||||||
if(!AI_HasSpells())
|
if(!AI_HasSpells())
|
||||||
return false;
|
return false;
|
||||||
@ -4714,9 +4702,6 @@ void Merc::DoClassAttacks(Mob *target) {
|
|||||||
|
|
||||||
bool Merc::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool IsFromSpell, ExtraAttackOptions *opts)
|
bool Merc::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool IsFromSpell, ExtraAttackOptions *opts)
|
||||||
{
|
{
|
||||||
|
|
||||||
_ZP(Client_Attack);
|
|
||||||
|
|
||||||
if (!other) {
|
if (!other) {
|
||||||
SetTarget(nullptr);
|
SetTarget(nullptr);
|
||||||
LogFile->write(EQEMuLog::Error, "A null Mob object was passed to Merc::Attack() for evaluation!");
|
LogFile->write(EQEMuLog::Error, "A null Mob object was passed to Merc::Attack() for evaluation!");
|
||||||
|
|||||||
@ -124,7 +124,6 @@ Mob::Mob(const char* in_name,
|
|||||||
move_tic_count = 0;
|
move_tic_count = 0;
|
||||||
|
|
||||||
_egnode = nullptr;
|
_egnode = nullptr;
|
||||||
adverrorinfo = 0;
|
|
||||||
name[0]=0;
|
name[0]=0;
|
||||||
orig_name[0]=0;
|
orig_name[0]=0;
|
||||||
clean_name[0]=0;
|
clean_name[0]=0;
|
||||||
@ -2180,7 +2179,6 @@ bool Mob::CanThisClassBlock(void) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
float Mob::Dist(const Mob &other) const {
|
float Mob::Dist(const Mob &other) const {
|
||||||
_ZP(Mob_Dist);
|
|
||||||
float xDiff = other.x_pos - x_pos;
|
float xDiff = other.x_pos - x_pos;
|
||||||
float yDiff = other.y_pos - y_pos;
|
float yDiff = other.y_pos - y_pos;
|
||||||
float zDiff = other.z_pos - z_pos;
|
float zDiff = other.z_pos - z_pos;
|
||||||
@ -2191,7 +2189,6 @@ float Mob::Dist(const Mob &other) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
float Mob::DistNoZ(const Mob &other) const {
|
float Mob::DistNoZ(const Mob &other) const {
|
||||||
_ZP(Mob_DistNoZ);
|
|
||||||
float xDiff = other.x_pos - x_pos;
|
float xDiff = other.x_pos - x_pos;
|
||||||
float yDiff = other.y_pos - y_pos;
|
float yDiff = other.y_pos - y_pos;
|
||||||
|
|
||||||
@ -2200,7 +2197,6 @@ float Mob::DistNoZ(const Mob &other) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
float Mob::DistNoRoot(const Mob &other) const {
|
float Mob::DistNoRoot(const Mob &other) const {
|
||||||
_ZP(Mob_DistNoRoot);
|
|
||||||
float xDiff = other.x_pos - x_pos;
|
float xDiff = other.x_pos - x_pos;
|
||||||
float yDiff = other.y_pos - y_pos;
|
float yDiff = other.y_pos - y_pos;
|
||||||
float zDiff = other.z_pos - z_pos;
|
float zDiff = other.z_pos - z_pos;
|
||||||
@ -2211,7 +2207,6 @@ float Mob::DistNoRoot(const Mob &other) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
float Mob::DistNoRoot(float x, float y, float z) const {
|
float Mob::DistNoRoot(float x, float y, float z) const {
|
||||||
_ZP(Mob_DistNoRoot);
|
|
||||||
float xDiff = x - x_pos;
|
float xDiff = x - x_pos;
|
||||||
float yDiff = y - y_pos;
|
float yDiff = y - y_pos;
|
||||||
float zDiff = z - z_pos;
|
float zDiff = z - z_pos;
|
||||||
@ -2222,7 +2217,6 @@ float Mob::DistNoRoot(float x, float y, float z) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
float Mob::DistNoRootNoZ(float x, float y) const {
|
float Mob::DistNoRootNoZ(float x, float y) const {
|
||||||
_ZP(Mob_DistNoRoot);
|
|
||||||
float xDiff = x - x_pos;
|
float xDiff = x - x_pos;
|
||||||
float yDiff = y - y_pos;
|
float yDiff = y - y_pos;
|
||||||
|
|
||||||
@ -2230,7 +2224,6 @@ float Mob::DistNoRootNoZ(float x, float y) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
float Mob::DistNoRootNoZ(const Mob &other) const {
|
float Mob::DistNoRootNoZ(const Mob &other) const {
|
||||||
_ZP(Mob_DistNoRootNoZ);
|
|
||||||
float xDiff = other.x_pos - x_pos;
|
float xDiff = other.x_pos - x_pos;
|
||||||
float yDiff = other.y_pos - y_pos;
|
float yDiff = other.y_pos - y_pos;
|
||||||
|
|
||||||
|
|||||||
@ -640,7 +640,6 @@ public:
|
|||||||
inline bool IsStunned() const { return stunned; }
|
inline bool IsStunned() const { return stunned; }
|
||||||
inline bool IsSilenced() const { return silenced; }
|
inline bool IsSilenced() const { return silenced; }
|
||||||
inline bool IsAmnesiad() const { return amnesiad; }
|
inline bool IsAmnesiad() const { return amnesiad; }
|
||||||
inline uint16 GetErrorNumber() const {return adverrorinfo;}
|
|
||||||
|
|
||||||
int32 ReduceDamage(int32 damage);
|
int32 ReduceDamage(int32 damage);
|
||||||
int32 AffectMagicalDamage(int32 damage, uint16 spell_id, const bool iBuffTic, Mob* attacker);
|
int32 AffectMagicalDamage(int32 damage, uint16 spell_id, const bool iBuffTic, Mob* attacker);
|
||||||
@ -1052,7 +1051,6 @@ protected:
|
|||||||
Timer gravity_timer;
|
Timer gravity_timer;
|
||||||
Timer viral_timer;
|
Timer viral_timer;
|
||||||
uint8 viral_timer_counter;
|
uint8 viral_timer_counter;
|
||||||
uint16 adverrorinfo;
|
|
||||||
|
|
||||||
// MobAI stuff
|
// MobAI stuff
|
||||||
eStandingPetOrder pStandingPetOrder;
|
eStandingPetOrder pStandingPetOrder;
|
||||||
|
|||||||
@ -333,7 +333,6 @@ int main(int argc, char** argv) {
|
|||||||
temp_timer.Start();
|
temp_timer.Start();
|
||||||
while(RunLoops) {
|
while(RunLoops) {
|
||||||
{ //profiler block to omit the sleep from times
|
{ //profiler block to omit the sleep from times
|
||||||
_ZP(net_main);
|
|
||||||
|
|
||||||
//Advance the timer to our current point in time
|
//Advance the timer to our current point in time
|
||||||
Timer::SetCurrentTime();
|
Timer::SetCurrentTime();
|
||||||
|
|||||||
@ -560,9 +560,6 @@ void NPC::RemoveCash() {
|
|||||||
|
|
||||||
bool NPC::Process()
|
bool NPC::Process()
|
||||||
{
|
{
|
||||||
_ZP(NPC_Process);
|
|
||||||
|
|
||||||
adverrorinfo = 1;
|
|
||||||
if (IsStunned() && stunned_timer.Check())
|
if (IsStunned() && stunned_timer.Check())
|
||||||
{
|
{
|
||||||
this->stunned = false;
|
this->stunned = false;
|
||||||
@ -583,8 +580,6 @@ bool NPC::Process()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
adverrorinfo = 2;
|
|
||||||
|
|
||||||
SpellProcess();
|
SpellProcess();
|
||||||
|
|
||||||
if(tic_timer.Check())
|
if(tic_timer.Check())
|
||||||
@ -2321,8 +2316,6 @@ bool NPC::CanTalk()
|
|||||||
//iOther the mob who is doing the looking. It should figure out
|
//iOther the mob who is doing the looking. It should figure out
|
||||||
//what iOther thinks about 'this'
|
//what iOther thinks about 'this'
|
||||||
FACTION_VALUE NPC::GetReverseFactionCon(Mob* iOther) {
|
FACTION_VALUE NPC::GetReverseFactionCon(Mob* iOther) {
|
||||||
_ZP(NPC_GetReverseFactionCon);
|
|
||||||
|
|
||||||
iOther = iOther->GetOwnerOrSelf();
|
iOther = iOther->GetOwnerOrSelf();
|
||||||
int primaryFaction= iOther->GetPrimaryFaction();
|
int primaryFaction= iOther->GetPrimaryFaction();
|
||||||
|
|
||||||
|
|||||||
@ -23,8 +23,6 @@ extern Zone *zone;
|
|||||||
|
|
||||||
float VertexDistance(VERTEX a, VERTEX b)
|
float VertexDistance(VERTEX a, VERTEX b)
|
||||||
{
|
{
|
||||||
_ZP(Pathing_VertexDistance);
|
|
||||||
|
|
||||||
float xdist = a.x - b.x;
|
float xdist = a.x - b.x;
|
||||||
float ydist = a.y - b.y;
|
float ydist = a.y - b.y;
|
||||||
float zdist = a.z - b.z;
|
float zdist = a.z - b.z;
|
||||||
@ -33,8 +31,6 @@ float VertexDistance(VERTEX a, VERTEX b)
|
|||||||
|
|
||||||
float VertexDistanceNoRoot(VERTEX a, VERTEX b)
|
float VertexDistanceNoRoot(VERTEX a, VERTEX b)
|
||||||
{
|
{
|
||||||
_ZP(Pathing_VertexDistanceNoRoot);
|
|
||||||
|
|
||||||
float xdist = a.x - b.x;
|
float xdist = a.x - b.x;
|
||||||
float ydist = a.y - b.y;
|
float ydist = a.y - b.y;
|
||||||
float zdist = a.z - b.z;
|
float zdist = a.z - b.z;
|
||||||
@ -211,8 +207,6 @@ VERTEX PathManager::GetPathNodeCoordinates(int NodeNumber, bool BestZ)
|
|||||||
|
|
||||||
std::list<int> PathManager::FindRoute(int startID, int endID)
|
std::list<int> PathManager::FindRoute(int startID, int endID)
|
||||||
{
|
{
|
||||||
_ZP(Pathing_FindRoute_FromNodes);
|
|
||||||
|
|
||||||
_log(PATHING__DEBUG, "FindRoute from node %i to %i", startID, endID);
|
_log(PATHING__DEBUG, "FindRoute from node %i to %i", startID, endID);
|
||||||
|
|
||||||
memset(ClosedListFlag, 0, sizeof(int) * Head.PathNodeCount);
|
memset(ClosedListFlag, 0, sizeof(int) * Head.PathNodeCount);
|
||||||
@ -358,9 +352,6 @@ bool SortPathNodesByDistance(PathNodeSortStruct n1, PathNodeSortStruct n2)
|
|||||||
|
|
||||||
std::list<int> PathManager::FindRoute(VERTEX Start, VERTEX End)
|
std::list<int> PathManager::FindRoute(VERTEX Start, VERTEX End)
|
||||||
{
|
{
|
||||||
|
|
||||||
_ZP(Pathing_FindRoute_FromVertices);
|
|
||||||
|
|
||||||
_log(PATHING__DEBUG, "FindRoute(%8.3f, %8.3f, %8.3f, %8.3f, %8.3f, %8.3f)", Start.x, Start.y, Start.z, End.x, End.y, End.z);
|
_log(PATHING__DEBUG, "FindRoute(%8.3f, %8.3f, %8.3f, %8.3f, %8.3f, %8.3f)", Start.x, Start.y, Start.z, End.x, End.y, End.z);
|
||||||
|
|
||||||
std::list<int> noderoute;
|
std::list<int> noderoute;
|
||||||
@ -663,8 +654,6 @@ void PathManager::SimpleMeshTest()
|
|||||||
|
|
||||||
VERTEX Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &WaypointChanged, bool &NodeReached)
|
VERTEX Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &WaypointChanged, bool &NodeReached)
|
||||||
{
|
{
|
||||||
_ZP(Pathing_UpdatePath);
|
|
||||||
|
|
||||||
WaypointChanged = false;
|
WaypointChanged = false;
|
||||||
|
|
||||||
NodeReached = false;
|
NodeReached = false;
|
||||||
@ -1153,8 +1142,6 @@ int PathManager::FindNearestPathNode(VERTEX Position)
|
|||||||
|
|
||||||
bool PathManager::NoHazards(VERTEX From, VERTEX To)
|
bool PathManager::NoHazards(VERTEX From, VERTEX To)
|
||||||
{
|
{
|
||||||
_ZP(Pathing_NoHazards);
|
|
||||||
|
|
||||||
// Test the Z coordinate at the mid point.
|
// Test the Z coordinate at the mid point.
|
||||||
//
|
//
|
||||||
VERTEX MidPoint((From.x + To.x) / 2, (From.y + To.y) / 2, From.z);
|
VERTEX MidPoint((From.x + To.x) / 2, (From.y + To.y) / 2, From.z);
|
||||||
@ -1293,9 +1280,6 @@ void Mob::PrintRoute()
|
|||||||
|
|
||||||
void PathManager::OpenDoors(int Node1, int Node2, Mob *ForWho)
|
void PathManager::OpenDoors(int Node1, int Node2, Mob *ForWho)
|
||||||
{
|
{
|
||||||
|
|
||||||
_ZP(Pathing_OpenDoors);
|
|
||||||
|
|
||||||
if(!ForWho || (Node1 >= Head.PathNodeCount) || (Node2 >= Head.PathNodeCount) || (Node1 < 0) || (Node2 < 0))
|
if(!ForWho || (Node1 >= Head.PathNodeCount) || (Node2 >= Head.PathNodeCount) || (Node1 < 0) || (Node2 < 0))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@ -138,8 +138,6 @@ uint32 Spawn2::despawnTimer(uint32 despawn_timer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Spawn2::Process() {
|
bool Spawn2::Process() {
|
||||||
_ZP(Spawn2_Process);
|
|
||||||
|
|
||||||
IsDespawned = false;
|
IsDespawned = false;
|
||||||
|
|
||||||
if(!Enabled())
|
if(!Enabled())
|
||||||
|
|||||||
@ -45,8 +45,6 @@ extern WorldServer worldserver;
|
|||||||
// in this case false will be returned, true otherwise
|
// in this case false will be returned, true otherwise
|
||||||
bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||||
{
|
{
|
||||||
_ZP(Mob_SpellEffect);
|
|
||||||
|
|
||||||
int caster_level, buffslot, effect, effect_value, i;
|
int caster_level, buffslot, effect, effect_value, i;
|
||||||
ItemInst *SummonedItem=nullptr;
|
ItemInst *SummonedItem=nullptr;
|
||||||
#ifdef SPELL_EFFECT_SPAM
|
#ifdef SPELL_EFFECT_SPAM
|
||||||
@ -3056,8 +3054,6 @@ void Mob::BuffProcess()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Mob::DoBuffTic(uint16 spell_id, int slot, uint32 ticsremaining, uint8 caster_level, Mob* caster) {
|
void Mob::DoBuffTic(uint16 spell_id, int slot, uint32 ticsremaining, uint8 caster_level, Mob* caster) {
|
||||||
_ZP(Mob_DoBuffTic);
|
|
||||||
|
|
||||||
int effect, effect_value;
|
int effect, effect_value;
|
||||||
|
|
||||||
if(!IsValidSpell(spell_id))
|
if(!IsValidSpell(spell_id))
|
||||||
|
|||||||
@ -167,8 +167,6 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
|
|||||||
int32 cast_time, int32 mana_cost, uint32* oSpellWillFinish, uint32 item_slot,
|
int32 cast_time, int32 mana_cost, uint32* oSpellWillFinish, uint32 item_slot,
|
||||||
uint32 timer, uint32 timer_duration, uint32 type, int16 *resist_adjust)
|
uint32 timer, uint32 timer_duration, uint32 type, int16 *resist_adjust)
|
||||||
{
|
{
|
||||||
_ZP(Mob_CastSpell);
|
|
||||||
|
|
||||||
mlog(SPELLS__CASTING, "CastSpell called for spell %s (%d) on entity %d, slot %d, time %d, mana %d, from item slot %d",
|
mlog(SPELLS__CASTING, "CastSpell called for spell %s (%d) on entity %d, slot %d, time %d, mana %d, from item slot %d",
|
||||||
spells[spell_id].name, spell_id, target_id, slot, cast_time, mana_cost, (item_slot==0xFFFFFFFF)?999:item_slot);
|
spells[spell_id].name, spell_id, target_id, slot, cast_time, mana_cost, (item_slot==0xFFFFFFFF)?999:item_slot);
|
||||||
|
|
||||||
@ -330,8 +328,6 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
|
|||||||
uint32 item_slot, uint32 timer, uint32 timer_duration, uint32 type,
|
uint32 item_slot, uint32 timer, uint32 timer_duration, uint32 type,
|
||||||
int16 resist_adjust)
|
int16 resist_adjust)
|
||||||
{
|
{
|
||||||
_ZP(Mob_DoCastSpell);
|
|
||||||
|
|
||||||
Mob* pMob = nullptr;
|
Mob* pMob = nullptr;
|
||||||
int32 orgcasttime;
|
int32 orgcasttime;
|
||||||
EQApplicationPacket *outapp = nullptr;
|
EQApplicationPacket *outapp = nullptr;
|
||||||
@ -800,8 +796,6 @@ void Mob::InterruptSpell(uint16 message, uint16 color, uint16 spellid)
|
|||||||
void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, uint16 slot,
|
void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, uint16 slot,
|
||||||
uint16 mana_used, uint32 inventory_slot, int16 resist_adjust)
|
uint16 mana_used, uint32 inventory_slot, int16 resist_adjust)
|
||||||
{
|
{
|
||||||
_ZP(Mob_CastedSpellFinished);
|
|
||||||
|
|
||||||
bool IsFromItem = false;
|
bool IsFromItem = false;
|
||||||
|
|
||||||
if(IsClient() && slot != USE_ITEM_SPELL_SLOT && slot != POTION_BELT_SPELL_SLOT && spells[spell_id].recast_time > 1000) { // 10 is item
|
if(IsClient() && slot != USE_ITEM_SPELL_SLOT && slot != POTION_BELT_SPELL_SLOT && spells[spell_id].recast_time > 1000) { // 10 is item
|
||||||
@ -1676,8 +1670,6 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
|||||||
bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16 mana_used,
|
bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16 mana_used,
|
||||||
uint32 inventory_slot, int16 resist_adjust, bool isproc)
|
uint32 inventory_slot, int16 resist_adjust, bool isproc)
|
||||||
{
|
{
|
||||||
_ZP(Mob_SpellFinished);
|
|
||||||
|
|
||||||
//EQApplicationPacket *outapp = nullptr;
|
//EQApplicationPacket *outapp = nullptr;
|
||||||
Mob *ae_center = nullptr;
|
Mob *ae_center = nullptr;
|
||||||
|
|
||||||
@ -3741,7 +3733,6 @@ void Mob::BuffFadeByEffect(int effectid, int skipslot)
|
|||||||
// returns true if the spell should fail, false otherwise
|
// returns true if the spell should fail, false otherwise
|
||||||
bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
||||||
{
|
{
|
||||||
_ZP(Mob_IsImmuneToSpell);
|
|
||||||
int effect_index;
|
int effect_index;
|
||||||
|
|
||||||
if(caster == nullptr)
|
if(caster == nullptr)
|
||||||
|
|||||||
@ -520,8 +520,6 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b
|
|||||||
if(GetID()==0)
|
if(GetID()==0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
_ZP(Mob_CalculateNewPosition2);
|
|
||||||
|
|
||||||
if ((x_pos-x == 0) && (y_pos-y == 0)) {//spawn is at target coords
|
if ((x_pos-x == 0) && (y_pos-y == 0)) {//spawn is at target coords
|
||||||
if(z_pos-z != 0) {
|
if(z_pos-z != 0) {
|
||||||
z_pos = z;
|
z_pos = z;
|
||||||
@ -755,12 +753,9 @@ bool Mob::CalculateNewPosition(float x, float y, float z, float speed, bool chec
|
|||||||
if(GetID()==0)
|
if(GetID()==0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
_ZP(Mob_CalculateNewPosition);
|
|
||||||
|
|
||||||
float nx = x_pos;
|
float nx = x_pos;
|
||||||
float ny = y_pos;
|
float ny = y_pos;
|
||||||
float nz = z_pos;
|
float nz = z_pos;
|
||||||
// float nh = heading;
|
|
||||||
|
|
||||||
// if NPC is rooted
|
// if NPC is rooted
|
||||||
if (speed == 0.0) {
|
if (speed == 0.0) {
|
||||||
@ -917,14 +912,12 @@ void NPC::AssignWaypoints(int32 grid) {
|
|||||||
if(!GridErr)
|
if(!GridErr)
|
||||||
{
|
{
|
||||||
this->CastToNPC()->SetGrid(grid); // Assign grid number
|
this->CastToNPC()->SetGrid(grid); // Assign grid number
|
||||||
adverrorinfo = 7561;
|
|
||||||
|
|
||||||
// Retrieve all waypoints for this grid
|
// Retrieve all waypoints for this grid
|
||||||
if(database.RunQuery(query,MakeAnyLenString(&query,"SELECT `x`,`y`,`z`,`pause`,`heading` FROM grid_entries WHERE `gridid`=%i AND `zoneid`=%i ORDER BY `number`",grid,zone->GetZoneID()),errbuf,&result))
|
if(database.RunQuery(query,MakeAnyLenString(&query,"SELECT `x`,`y`,`z`,`pause`,`heading` FROM grid_entries WHERE `gridid`=%i AND `zoneid`=%i ORDER BY `number`",grid,zone->GetZoneID()),errbuf,&result))
|
||||||
{
|
{
|
||||||
roamer = true;
|
roamer = true;
|
||||||
max_wp = -1; // Initialize it; will increment it for each waypoint successfully added to the list
|
max_wp = -1; // Initialize it; will increment it for each waypoint successfully added to the list
|
||||||
adverrorinfo = 7564;
|
|
||||||
|
|
||||||
while((row = mysql_fetch_row(result)))
|
while((row = mysql_fetch_row(result)))
|
||||||
{
|
{
|
||||||
@ -1084,7 +1077,6 @@ uint8 ZoneDatabase::GetGridType2(uint32 grid, uint16 zoneid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool ZoneDatabase::GetWaypoints(uint32 grid, uint16 zoneid, uint32 num, wplist* wp) {
|
bool ZoneDatabase::GetWaypoints(uint32 grid, uint16 zoneid, uint32 num, wplist* wp) {
|
||||||
_CP(Database_GetWaypoints);
|
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
char errbuff[MYSQL_ERRMSG_SIZE];
|
char errbuff[MYSQL_ERRMSG_SIZE];
|
||||||
MYSQL_RES *result;
|
MYSQL_RES *result;
|
||||||
|
|||||||
@ -135,8 +135,6 @@ void WorldServer::OnConnected() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WorldServer::Process() {
|
void WorldServer::Process() {
|
||||||
_ZP(WorldServer_Process);
|
|
||||||
|
|
||||||
WorldConnection::Process();
|
WorldConnection::Process();
|
||||||
|
|
||||||
if (!Connected())
|
if (!Connected())
|
||||||
|
|||||||
@ -81,7 +81,6 @@ extern DBAsyncFinishedQueue MTdbafq;
|
|||||||
extern DBAsync *dbasync;
|
extern DBAsync *dbasync;
|
||||||
|
|
||||||
bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
||||||
_ZP(Zone_Bootup);
|
|
||||||
const char* zonename = database.GetZoneName(iZoneID);
|
const char* zonename = database.GetZoneName(iZoneID);
|
||||||
|
|
||||||
if (iZoneID == 0 || zonename == 0)
|
if (iZoneID == 0 || zonename == 0)
|
||||||
@ -1272,10 +1271,6 @@ uint32 Zone::CountAuth() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Zone::Process() {
|
bool Zone::Process() {
|
||||||
LockMutex lock(&MZoneLock);
|
|
||||||
_ZP(Zone_Process);
|
|
||||||
|
|
||||||
|
|
||||||
spawn_conditions.Process();
|
spawn_conditions.Process();
|
||||||
|
|
||||||
if(spawn2_timer.Check()) {
|
if(spawn2_timer.Check()) {
|
||||||
@ -1430,7 +1425,6 @@ bool Zone::Process() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Zone::StartShutdownTimer(uint32 set_time) {
|
void Zone::StartShutdownTimer(uint32 set_time) {
|
||||||
MZoneLock.lock();
|
|
||||||
if (set_time > autoshutdown_timer.GetRemainingTime()) {
|
if (set_time > autoshutdown_timer.GetRemainingTime()) {
|
||||||
if (set_time == (RuleI(Zone, AutoShutdownDelay)))
|
if (set_time == (RuleI(Zone, AutoShutdownDelay)))
|
||||||
{
|
{
|
||||||
@ -1438,11 +1432,10 @@ void Zone::StartShutdownTimer(uint32 set_time) {
|
|||||||
}
|
}
|
||||||
autoshutdown_timer.Start(set_time, false);
|
autoshutdown_timer.Start(set_time, false);
|
||||||
}
|
}
|
||||||
MZoneLock.unlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Zone::Depop(bool StartSpawnTimer) {
|
bool Zone::Depop(bool StartSpawnTimer) {
|
||||||
std::map<uint32,NPCType *>::iterator itr;
|
std::map<uint32,NPCType *>::iterator itr;
|
||||||
entity_list.Depop(StartSpawnTimer);
|
entity_list.Depop(StartSpawnTimer);
|
||||||
|
|
||||||
// Refresh npctable, getting current info from database.
|
// Refresh npctable, getting current info from database.
|
||||||
@ -1462,7 +1455,6 @@ void Zone::Repop(uint32 delay) {
|
|||||||
|
|
||||||
LinkedListIterator<Spawn2*> iterator(spawn2_list);
|
LinkedListIterator<Spawn2*> iterator(spawn2_list);
|
||||||
|
|
||||||
MZoneLock.lock();
|
|
||||||
iterator.Reset();
|
iterator.Reset();
|
||||||
while (iterator.MoreElements()) {
|
while (iterator.MoreElements()) {
|
||||||
iterator.RemoveCurrent();
|
iterator.RemoveCurrent();
|
||||||
@ -1471,8 +1463,6 @@ void Zone::Repop(uint32 delay) {
|
|||||||
if (!database.PopulateZoneSpawnList(zoneid, spawn2_list, GetInstanceVersion(), delay))
|
if (!database.PopulateZoneSpawnList(zoneid, spawn2_list, GetInstanceVersion(), delay))
|
||||||
LogFile->write(EQEMuLog::Debug, "Error in Zone::Repop: database.PopulateZoneSpawnList failed");
|
LogFile->write(EQEMuLog::Debug, "Error in Zone::Repop: database.PopulateZoneSpawnList failed");
|
||||||
|
|
||||||
MZoneLock.unlock();
|
|
||||||
|
|
||||||
initgrids_timer.Start();
|
initgrids_timer.Start();
|
||||||
|
|
||||||
//MODDING HOOK FOR REPOP
|
//MODDING HOOK FOR REPOP
|
||||||
|
|||||||
@ -322,7 +322,6 @@ private:
|
|||||||
QGlobalCache *qGlobals;
|
QGlobalCache *qGlobals;
|
||||||
|
|
||||||
Timer hotzone_timer;
|
Timer hotzone_timer;
|
||||||
Mutex MZoneLock;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -1,299 +0,0 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
Copyright (C) 2001-2004 EQEMu Development Team (http://eqemulator.net)
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; version 2 of the License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
|
||||||
are required to give you total support for your newly bought product;
|
|
||||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
#include "../common/debug.h"
|
|
||||||
#include "../common/features.h"
|
|
||||||
|
|
||||||
#ifdef EQPROFILE
|
|
||||||
#include "zone_profile.h"
|
|
||||||
#include "../common/common_profile.h"
|
|
||||||
#include "../common/timer.h"
|
|
||||||
#include "../common/rdtsc.h"
|
|
||||||
|
|
||||||
#include <time.h>
|
|
||||||
#include <string.h>
|
|
||||||
#ifdef WIN32
|
|
||||||
#include <process.h>
|
|
||||||
|
|
||||||
#define snprintf _snprintf
|
|
||||||
#define vsnprintf _vsnprintf
|
|
||||||
#define strncasecmp _strnicmp
|
|
||||||
#define strcasecmp _stricmp
|
|
||||||
#else
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include <algorithm>
|
|
||||||
|
|
||||||
#ifdef COMMON_PROFILE
|
|
||||||
CommonProfiler _cp;
|
|
||||||
#endif
|
|
||||||
#ifdef ZONE_PROFILE
|
|
||||||
ZoneProfiler _zp;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class _DZP_Data {
|
|
||||||
public:
|
|
||||||
_DZP_Data(const char *_str, unsigned long long _count, double _dur) {
|
|
||||||
str = _str;
|
|
||||||
count = _count;
|
|
||||||
dur = _dur;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *str;
|
|
||||||
unsigned long long count;
|
|
||||||
double dur;
|
|
||||||
};
|
|
||||||
|
|
||||||
bool operator<(const _DZP_Data &l, const _DZP_Data &r) {
|
|
||||||
return(l.dur < r.dur);
|
|
||||||
}
|
|
||||||
|
|
||||||
RDTSC_Collector __DZP_timer(true);
|
|
||||||
|
|
||||||
#ifdef COMMON_PROFILE
|
|
||||||
/*
|
|
||||||
|
|
||||||
*/
|
|
||||||
const char *__cp_names[CommonProfiler::MaxCommonProfilerId] = {
|
|
||||||
"Database_SaveInventory = 0",
|
|
||||||
"Database_StoreCharacter",
|
|
||||||
"Database_GetCharacterInfoForLogin",
|
|
||||||
"Database_GetCharacterInfoForLogin_result",
|
|
||||||
"Database_GetPlayerProfile",
|
|
||||||
"Database_GetInventory",
|
|
||||||
"Database_GetInventory_name",
|
|
||||||
"Database_SetPlayerProfile",
|
|
||||||
"Database_DBLoadItems",
|
|
||||||
"Database_GetWaypoints",
|
|
||||||
"Database_DBLoadNPCFactionLists",
|
|
||||||
|
|
||||||
"DBcore_RunQuery",
|
|
||||||
|
|
||||||
"DBAsync_ProcessWork",
|
|
||||||
"DBAsync_DispatchWork",
|
|
||||||
"DBAsyncLoop_loop",
|
|
||||||
|
|
||||||
"EQStreamServer_Process",
|
|
||||||
|
|
||||||
"EQStream_Process",
|
|
||||||
|
|
||||||
"EQStreamServerLoop",
|
|
||||||
"EQStreamInLoop",
|
|
||||||
"EQStreamOutLoop",
|
|
||||||
"TCPServerLoop",
|
|
||||||
"TCPConnectionLoop",
|
|
||||||
|
|
||||||
"Inventory_GetItem",
|
|
||||||
"Inventory_HasItem",
|
|
||||||
|
|
||||||
"MakeRandomFloat",
|
|
||||||
|
|
||||||
"Mutex_lock",
|
|
||||||
"Timer_Check",
|
|
||||||
|
|
||||||
"WorldConnection_Process"
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ZONE_PROFILE
|
|
||||||
const char *__zp_names[ZoneProfiler::MaxZoneProfilerId] = {
|
|
||||||
"Client_Process = 0",
|
|
||||||
"Client_HandlePacket",
|
|
||||||
"Client_QueuePacket",
|
|
||||||
"Client_Save",
|
|
||||||
"Client_Attack",
|
|
||||||
"Client_CalcBonuses",
|
|
||||||
"Client_GetFactionLevel",
|
|
||||||
"Client_SetFactionLevel",
|
|
||||||
"Client_SetFactionLevel2",
|
|
||||||
|
|
||||||
"NPC_Attack",
|
|
||||||
"NPC_GetReverseFactionCon",
|
|
||||||
"NPC_Process",
|
|
||||||
"NPC_Death",
|
|
||||||
#ifdef EQBOTS
|
|
||||||
"NPC_BotAttackMelee",
|
|
||||||
#endif
|
|
||||||
|
|
||||||
"EntityList_TrapProcess",
|
|
||||||
"EntityList_GroupProcess",
|
|
||||||
"EntityList_QueueToGroupsForNPCHealthAA",
|
|
||||||
"EntityList_DoorProcess",
|
|
||||||
"EntityList_ObjectProcess",
|
|
||||||
"EntityList_CorpseProcess",
|
|
||||||
"EntityList_MobProcess",
|
|
||||||
"EntityList_BeaconProcess",
|
|
||||||
"EntityList_Process",
|
|
||||||
"EntityList_RaidProcess",
|
|
||||||
"EntityList_AICheckCloseAggro",
|
|
||||||
"EntityList_AICheckCloseBeneficialSpells",
|
|
||||||
"EntityList_CheckClientAggro",
|
|
||||||
"EntityList_CheckClientAggro_Loop",
|
|
||||||
"EntityList_AIYellForHelp",
|
|
||||||
#ifdef EQBOTS
|
|
||||||
"EntityList_Bot_AICheckCloseBeneficialSpells",
|
|
||||||
#endif
|
|
||||||
|
|
||||||
"HateList_Find",
|
|
||||||
"HateList_GetDamageTop",
|
|
||||||
"HateList_GetClosest",
|
|
||||||
"HateList_DoFactionHits",
|
|
||||||
"HateList_GetTop",
|
|
||||||
"HateList_IsEmpty",
|
|
||||||
"HateList_GetMostHate",
|
|
||||||
|
|
||||||
"Mob_CheckWillAggro",
|
|
||||||
"Mob_CheckLosFN",
|
|
||||||
"Mob_Dist",
|
|
||||||
"Mob_DistNoZ",
|
|
||||||
"Mob_DistNoRoot",
|
|
||||||
"Mob_DistNoRootNoZ",
|
|
||||||
"Mob_AICastSpell",
|
|
||||||
"Mob_SpellEffect",
|
|
||||||
"Mob_DoBuffTic",
|
|
||||||
"Mob_CastSpell",
|
|
||||||
"Mob_DoCastSpell",
|
|
||||||
"Mob_CastedSpellFinished",
|
|
||||||
"Mob_SpellFinished",
|
|
||||||
"Mob_IsImmuneToSpell",
|
|
||||||
"Mob_CalculateNewPosition",
|
|
||||||
"Mob_CalculateNewPosition2",
|
|
||||||
"Mob_GetWeaponDamageA",
|
|
||||||
"Mob_GetWeaponDamage",
|
|
||||||
"Mob_GetWeaponDamageBonus",
|
|
||||||
"Mob_TryWeaponProcA",
|
|
||||||
"Mob_TryWeaponProcB",
|
|
||||||
#ifdef EQBOTS
|
|
||||||
"NPC_Bot_AICastSpell",
|
|
||||||
"Bot_AI_Process_pursue_cast",
|
|
||||||
"Bot_PET_Process_IsEngaged",
|
|
||||||
#endif
|
|
||||||
|
|
||||||
"Map_LineIntersectsZone",
|
|
||||||
"Map_LineIntersectsNode",
|
|
||||||
"Map_FindBestZ",
|
|
||||||
|
|
||||||
"Pathing_FindRoute_FromNodes",
|
|
||||||
"Pathing_CheckTerrainPassable",
|
|
||||||
"Pathing_FindRoute_FromVertices",
|
|
||||||
"Pathing_UpdatePath",
|
|
||||||
"Pathing_NoHazards",
|
|
||||||
"Pathing_OpenDoors",
|
|
||||||
"Pathing_VertexDistance",
|
|
||||||
"Pathing_VertexDistanceNoRoot",
|
|
||||||
|
|
||||||
"Mob_AI_Process",
|
|
||||||
"Mob_AI_Process_engaged",
|
|
||||||
"Mob_AI_Process_engaged_cast",
|
|
||||||
"Mob_AI_Process_pursue_cast",
|
|
||||||
"Mob_AI_Process_autocast",
|
|
||||||
"Mob_AI_Process_scanarea",
|
|
||||||
"Mob_AI_Process_move",
|
|
||||||
"Mob_AI_Process_pet",
|
|
||||||
"Mob_AI_Process_roambox",
|
|
||||||
"Mob_AI_Process_roamer",
|
|
||||||
"Mob_AI_Process_guard",
|
|
||||||
#ifdef EQBOTS
|
|
||||||
"Mob_BOT_Process",
|
|
||||||
"Mob_BOT_Process_IsEngaged",
|
|
||||||
"Bot_AI_Process_engaged_cast",
|
|
||||||
"NPC_Bot_AI_IdleCastCheck",
|
|
||||||
#endif
|
|
||||||
|
|
||||||
"Database_AddLootTableToNPC",
|
|
||||||
|
|
||||||
"Zone_Bootup",
|
|
||||||
"Zone_Process",
|
|
||||||
|
|
||||||
"WorldServer_Process",
|
|
||||||
|
|
||||||
"Spawn2_Process",
|
|
||||||
|
|
||||||
"PerlembParser_SendCommands",
|
|
||||||
"PerlXSParser_SendCommands",
|
|
||||||
|
|
||||||
"command_realdispatch",
|
|
||||||
"net_main"
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void DumpZoneProfile() {
|
|
||||||
__DZP_timer.stop();
|
|
||||||
time_t aclock;
|
|
||||||
struct tm *newtime;
|
|
||||||
|
|
||||||
time( &aclock ); /* Get time in seconds */
|
|
||||||
newtime = localtime( &aclock ); /* Convert time to struct */
|
|
||||||
LogFile->write(EQEMuLog::Debug, "Profiling dump at: [%02d/%02d - %02d:%02d:%02d] (%.2f ms of data)",
|
|
||||||
newtime->tm_mon+1, newtime->tm_mday, newtime->tm_hour, newtime->tm_min, newtime->tm_sec,
|
|
||||||
__DZP_timer.getTotalDuration());
|
|
||||||
|
|
||||||
std::vector<_DZP_Data> data;
|
|
||||||
|
|
||||||
|
|
||||||
int r;
|
|
||||||
#ifdef COMMON_PROFILE
|
|
||||||
//Dump common profile
|
|
||||||
for(r = 0; r < CommonProfiler::MaxCommonProfilerId; r++) {
|
|
||||||
data.push_back(_DZP_Data(__cp_names[r], _cp.getCount(r), _cp.getTotalDuration(r)));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ZONE_PROFILE
|
|
||||||
//Dump zone profile
|
|
||||||
for(r = 0; r < ZoneProfiler::MaxZoneProfilerId; r++) {
|
|
||||||
data.push_back(_DZP_Data(__zp_names[r], _zp.getCount(r), _zp.getTotalDuration(r)));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
sort(data.begin(), data.end());
|
|
||||||
|
|
||||||
std::vector<_DZP_Data>::iterator cur,end;
|
|
||||||
cur = data.begin();
|
|
||||||
end = data.end();
|
|
||||||
|
|
||||||
for(; cur != end; cur++) {
|
|
||||||
if(cur->count == 0)
|
|
||||||
continue; //dont print empty timers.
|
|
||||||
|
|
||||||
LogFile->write(EQEMuLog::Debug, "..%s: %llu calls, %.4fms", cur->str, (unsigned long long)cur->count, cur->dur);
|
|
||||||
}
|
|
||||||
|
|
||||||
LogFile->write(EQEMuLog::Debug, "End Profiling dump at: [%02d/%02d - %02d:%02d:%02d] (%.2f ms of data)",
|
|
||||||
newtime->tm_mon+1, newtime->tm_mday, newtime->tm_hour, newtime->tm_min, newtime->tm_sec,
|
|
||||||
__DZP_timer.getTotalDuration());
|
|
||||||
|
|
||||||
__DZP_timer.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ResetZoneProfile() {
|
|
||||||
LogFile->write(EQEMuLog::Debug, "Profiling information reset...");
|
|
||||||
#ifdef COMMON_PROFILE
|
|
||||||
_cp.reset();
|
|
||||||
#endif
|
|
||||||
#ifdef ZONE_PROFILE
|
|
||||||
_zp.reset();
|
|
||||||
#endif
|
|
||||||
__DZP_timer.reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif //EQPROFILE
|
|
||||||
|
|
||||||
@ -1,165 +0,0 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
Copyright (C) 2001-2004 EQEMu Development Team (http://eqemulator.net)
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; version 2 of the License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
|
||||||
are required to give you total support for your newly bought product;
|
|
||||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
#ifndef ZONE_PROFILE_H
|
|
||||||
#define ZONE_PROFILE_H
|
|
||||||
|
|
||||||
#ifdef ZONE //only possibly profile if we are building zone
|
|
||||||
#include "../common/features.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef EQPROFILE
|
|
||||||
extern void DumpZoneProfile();
|
|
||||||
extern void ResetZoneProfile();
|
|
||||||
#ifdef PROFILE_DUMP_TIME
|
|
||||||
extern void ProfilerProcess();
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#ifdef ZONE_PROFILE //no EQPROFILE == no zone profile
|
|
||||||
#undef ZONE_PROFILE
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ZONE_PROFILE
|
|
||||||
|
|
||||||
#include "../common/profiler.h"
|
|
||||||
|
|
||||||
class ZoneProfiler : public GeneralProfiler {
|
|
||||||
public:
|
|
||||||
enum {
|
|
||||||
Client_Process = 0,
|
|
||||||
Client_HandlePacket,
|
|
||||||
Client_QueuePacket,
|
|
||||||
Client_Save,
|
|
||||||
Client_Attack,
|
|
||||||
Client_CalcBonuses,
|
|
||||||
Client_GetFactionLevel,
|
|
||||||
Client_SetFactionLevel,
|
|
||||||
Client_SetFactionLevel2,
|
|
||||||
|
|
||||||
NPC_Attack,
|
|
||||||
NPC_GetReverseFactionCon,
|
|
||||||
NPC_Process,
|
|
||||||
NPC_Death,
|
|
||||||
|
|
||||||
EntityList_TrapProcess,
|
|
||||||
EntityList_GroupProcess,
|
|
||||||
EntityList_QueueToGroupsForNPCHealthAA,
|
|
||||||
EntityList_DoorProcess,
|
|
||||||
EntityList_ObjectProcess,
|
|
||||||
EntityList_CorpseProcess,
|
|
||||||
EntityList_MobProcess,
|
|
||||||
EntityList_BeaconProcess,
|
|
||||||
EntityList_Process,
|
|
||||||
EntityList_RaidProcess,
|
|
||||||
EntityList_AICheckCloseAggro,
|
|
||||||
EntityList_AICheckCloseBeneficialSpells,
|
|
||||||
EntityList_CheckClientAggro,
|
|
||||||
EntityList_CheckClientAggro_Loop,
|
|
||||||
EntityList_AIYellForHelp,
|
|
||||||
|
|
||||||
HateList_Find,
|
|
||||||
HateList_GetDamageTop,
|
|
||||||
HateList_GetClosest,
|
|
||||||
HateList_DoFactionHits,
|
|
||||||
HateList_GetTop,
|
|
||||||
HateList_IsEmpty,
|
|
||||||
HateList_GetMostHate,
|
|
||||||
|
|
||||||
Mob_CheckWillAggro,
|
|
||||||
Mob_CheckLosFN,
|
|
||||||
Mob_Dist,
|
|
||||||
Mob_DistNoZ,
|
|
||||||
Mob_DistNoRoot,
|
|
||||||
Mob_DistNoRootNoZ,
|
|
||||||
Mob_AICastSpell,
|
|
||||||
Mob_SpellEffect,
|
|
||||||
Mob_DoBuffTic,
|
|
||||||
Mob_CastSpell,
|
|
||||||
Mob_DoCastSpell,
|
|
||||||
Mob_CastedSpellFinished,
|
|
||||||
Mob_SpellFinished,
|
|
||||||
Mob_IsImmuneToSpell,
|
|
||||||
Mob_CalculateNewPosition,
|
|
||||||
Mob_CalculateNewPosition2,
|
|
||||||
Mob_GetWeaponDamageA,
|
|
||||||
Mob_GetWeaponDamageB,
|
|
||||||
Mob_GetWeaponDamageBonus,
|
|
||||||
Mob_TryWeaponProcA,
|
|
||||||
Mob_TryWeaponProcB,
|
|
||||||
|
|
||||||
Map_LineIntersectsZone,
|
|
||||||
Map_LineIntersectsNode,
|
|
||||||
Map_FindBestZ,
|
|
||||||
|
|
||||||
Pathing_FindRoute_FromNodes,
|
|
||||||
Pathing_CheckTerrainPassable,
|
|
||||||
Pathing_FindRoute_FromVertices,
|
|
||||||
Pathing_UpdatePath,
|
|
||||||
Pathing_NoHazards,
|
|
||||||
Pathing_OpenDoors,
|
|
||||||
Pathing_VertexDistance,
|
|
||||||
Pathing_VertexDistanceNoRoot,
|
|
||||||
|
|
||||||
Mob_AI_Process,
|
|
||||||
Mob_AI_Process_engaged,
|
|
||||||
Mob_AI_Process_engaged_cast,
|
|
||||||
Mob_AI_Process_pursue_cast,
|
|
||||||
Mob_AI_Process_autocast,
|
|
||||||
Mob_AI_Process_scanarea,
|
|
||||||
Mob_AI_Process_move,
|
|
||||||
Mob_AI_Process_pet,
|
|
||||||
Mob_AI_Process_roambox,
|
|
||||||
Mob_AI_Process_roamer,
|
|
||||||
Mob_AI_Process_guard,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Database_AddLootTableToNPC,
|
|
||||||
|
|
||||||
Zone_Bootup,
|
|
||||||
Zone_Process,
|
|
||||||
|
|
||||||
WorldServer_Process,
|
|
||||||
|
|
||||||
Spawn2_Process,
|
|
||||||
|
|
||||||
PerlembParser_SendCommands,
|
|
||||||
PerlXSParser_SendCommands,
|
|
||||||
|
|
||||||
command_realdispatch,
|
|
||||||
|
|
||||||
net_main,
|
|
||||||
|
|
||||||
MaxZoneProfilerId
|
|
||||||
};
|
|
||||||
|
|
||||||
inline ZoneProfiler() : GeneralProfiler(MaxZoneProfilerId) { }
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
extern ZoneProfiler _zp;
|
|
||||||
|
|
||||||
#define _ZP(name) _GP(_zp, ZoneProfiler, name)
|
|
||||||
#else
|
|
||||||
//no zone profiling, dummy functions
|
|
||||||
#define _ZP(name) ;
|
|
||||||
|
|
||||||
#endif //ZONE_PROFILE
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@ -833,7 +833,6 @@ bool ZoneDatabase::GetCharacterInfoForLogin(const char* name, uint32* character_
|
|||||||
char* current_zone, PlayerProfile_Struct* pp, Inventory* inv, ExtendedProfile_Struct *ext,
|
char* current_zone, PlayerProfile_Struct* pp, Inventory* inv, ExtendedProfile_Struct *ext,
|
||||||
uint32* pplen, uint32* guilddbid, uint8* guildrank,
|
uint32* pplen, uint32* guilddbid, uint8* guildrank,
|
||||||
uint8 *class_, uint8 *level, bool *LFP, bool *LFG, uint8 *NumXTargets, uint8 *firstlogon) {
|
uint8 *class_, uint8 *level, bool *LFP, bool *LFG, uint8 *NumXTargets, uint8 *firstlogon) {
|
||||||
_CP(Database_GetCharacterInfoForLogin);
|
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
char *query = 0;
|
char *query = 0;
|
||||||
uint32 querylen;
|
uint32 querylen;
|
||||||
@ -871,7 +870,6 @@ bool ZoneDatabase::GetCharacterInfoForLogin_result(MYSQL_RES* result,
|
|||||||
uint32* character_id, char* current_zone, PlayerProfile_Struct* pp, Inventory* inv,
|
uint32* character_id, char* current_zone, PlayerProfile_Struct* pp, Inventory* inv,
|
||||||
ExtendedProfile_Struct *ext, uint32* pplen, uint32* guilddbid, uint8* guildrank,
|
ExtendedProfile_Struct *ext, uint32* pplen, uint32* guilddbid, uint8* guildrank,
|
||||||
uint8 *class_, uint8 *level, bool *LFP, bool *LFG, uint8 *NumXTargets, uint8* firstlogon) {
|
uint8 *class_, uint8 *level, bool *LFP, bool *LFG, uint8 *NumXTargets, uint8* firstlogon) {
|
||||||
_CP(Database_GetCharacterInfoForLogin_result);
|
|
||||||
|
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
unsigned long* lengths;
|
unsigned long* lengths;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user