mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
High level debug (12) compile failure fix - I searched for as many as I could find with GrepWin, so there may be a few out there still
This commit is contained in:
parent
b4068823ed
commit
cab77e83da
@ -1,5 +1,13 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
== 10/27/2013 ==
|
||||
Uleat: Attempted fix for high level (12) debug compile failiures
|
||||
Notes:
|
||||
- Explicit Windows vs. Linus code was not changed due to my inability to compile Linux code
|
||||
- Only CMake accessible flags were corrected if adding the 'std' namespace did not correct the issue
|
||||
- the tag [CODEBUG] was added to code identifed by the above note
|
||||
- If you are having compile issues after this patch is committed, look to the changes here first
|
||||
|
||||
== 10/24/2013 ==
|
||||
demonstar55: Fix some memory leaks in Mob::SpellOnTarget
|
||||
|
||||
|
||||
@ -343,7 +343,7 @@ bool valid=false;
|
||||
uint16 packet_crc=ntohs(*(const uint16 *)(buffer+length-2));
|
||||
#ifdef EQN_DEBUG
|
||||
if (packet_crc && comp_crc != packet_crc) {
|
||||
cout << "CRC mismatch: comp=" << hex << comp_crc << ", packet=" << packet_crc << dec << endl;
|
||||
std::cout << "CRC mismatch: comp=" << std::hex << comp_crc << ", packet=" << packet_crc << std::dec << std::endl;
|
||||
}
|
||||
#endif
|
||||
valid = (!packet_crc || comp_crc == packet_crc);
|
||||
|
||||
@ -326,7 +326,7 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
//cout << "Got OP_SessionRequest" << endl;
|
||||
//std::cout << "Got OP_SessionRequest" << std::endl;
|
||||
init();
|
||||
OutboundQueueClear();
|
||||
SessionRequest *Request=(SessionRequest *)p->pBuffer;
|
||||
@ -654,7 +654,7 @@ void EQStream::Write(int eq_fd)
|
||||
int32 threshold=RateThreshold;
|
||||
MRate.unlock();
|
||||
if (BytesWritten > threshold) {
|
||||
//cout << "Over threshold: " << BytesWritten << " > " << threshold << endl;
|
||||
//std::cout << "Over threshold: " << BytesWritten << " > " << threshold << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -848,15 +848,15 @@ sockaddr_in address;
|
||||
address.sin_port=remote_port;
|
||||
#ifdef NOWAY
|
||||
uint32 ip=address.sin_addr.s_addr;
|
||||
cout << "Sending to: "
|
||||
std::cout << "Sending to: "
|
||||
<< (int)*(unsigned char *)&ip
|
||||
<< "." << (int)*((unsigned char *)&ip+1)
|
||||
<< "." << (int)*((unsigned char *)&ip+2)
|
||||
<< "." << (int)*((unsigned char *)&ip+3)
|
||||
<< "," << (int)ntohs(address.sin_port) << "(" << p->size << ")" << endl;
|
||||
<< "," << (int)ntohs(address.sin_port) << "(" << p->size << ")" << std::endl;
|
||||
|
||||
p->DumpRaw();
|
||||
cout << "-------------" << endl;
|
||||
std::cout << "-------------" << std::endl;
|
||||
#endif
|
||||
length=p->serialize(buffer);
|
||||
if (p->opcode!=OP_SessionRequest && p->opcode!=OP_SessionResponse) {
|
||||
@ -907,7 +907,7 @@ char temp[15];
|
||||
*((unsigned char *)&ip+2),
|
||||
*((unsigned char *)&ip+3),
|
||||
ntohs(from->sin_port));
|
||||
//cout << timestamp() << "Data from: " << temp << " OpCode 0x" << hex << setw(2) << setfill('0') << (int)p->opcode << dec << endl;
|
||||
//std::cout << timestamp() << "Data from: " << temp << " OpCode 0x" << std::hex << std::setw(2) << std::setfill('0') << (int)p->opcode << std::dec << std::endl;
|
||||
//dump_message(p->pBuffer,p->size,timestamp());
|
||||
|
||||
}
|
||||
|
||||
@ -104,8 +104,8 @@ struct sockaddr_in address;
|
||||
fcntl(sock, F_SETFL, O_NONBLOCK);
|
||||
#endif
|
||||
//moved these because on windows the output was delayed and causing the console window to look bad
|
||||
//cout << "Starting factory Reader" << endl;
|
||||
//cout << "Starting factory Writer" << endl;
|
||||
//std::cout << "Starting factory Reader" << std::endl;
|
||||
//std::cout << "Starting factory Writer" << std::endl;
|
||||
#ifdef _WINDOWS
|
||||
_beginthread(EQStreamFactoryReaderLoop,0, this);
|
||||
_beginthread(EQStreamFactoryWriterLoop,0, this);
|
||||
@ -119,7 +119,7 @@ struct sockaddr_in address;
|
||||
EQStream *EQStreamFactory::Pop()
|
||||
{
|
||||
EQStream *s=nullptr;
|
||||
//cout << "Pop():Locking MNewStreams" << endl;
|
||||
//std::cout << "Pop():Locking MNewStreams" << std::endl;
|
||||
MNewStreams.lock();
|
||||
if (NewStreams.size()) {
|
||||
s=NewStreams.front();
|
||||
@ -127,18 +127,18 @@ EQStream *s=nullptr;
|
||||
s->PutInUse();
|
||||
}
|
||||
MNewStreams.unlock();
|
||||
//cout << "Pop(): Unlocking MNewStreams" << endl;
|
||||
//std::cout << "Pop(): Unlocking MNewStreams" << std::endl;
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
void EQStreamFactory::Push(EQStream *s)
|
||||
{
|
||||
//cout << "Push():Locking MNewStreams" << endl;
|
||||
//std::cout << "Push():Locking MNewStreams" << std::endl;
|
||||
MNewStreams.lock();
|
||||
NewStreams.push(s);
|
||||
MNewStreams.unlock();
|
||||
//cout << "Push(): Unlocking MNewStreams" << endl;
|
||||
//std::cout << "Push(): Unlocking MNewStreams" << std::endl;
|
||||
}
|
||||
|
||||
void EQStreamFactory::ReaderLoop()
|
||||
@ -240,7 +240,7 @@ void EQStreamFactory::CheckTimeout()
|
||||
//give it a little time for everybody to finish with it
|
||||
} else {
|
||||
//everybody is done, we can delete it now
|
||||
//cout << "Removing connection" << endl;
|
||||
//std::cout << "Removing connection" << std::endl;
|
||||
std::map<std::string,EQStream *>::iterator temp=stream_itr;
|
||||
stream_itr++;
|
||||
//let whoever has the stream outside delete it
|
||||
@ -318,9 +318,9 @@ Timer DecayTimer(20);
|
||||
stream_count=Streams.size();
|
||||
MStreams.unlock();
|
||||
if (!stream_count) {
|
||||
//cout << "No streams, waiting on condition" << endl;
|
||||
//std::cout << "No streams, waiting on condition" << std::endl;
|
||||
WriterWork.Wait();
|
||||
//cout << "Awake from condition, must have a stream now" << endl;
|
||||
//std::cout << "Awake from condition, must have a stream now" << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -171,7 +171,7 @@ bool EmuTCPConnection::SendPacket(ServerPacket* pack, uint32 iDestination) {
|
||||
struct in_addr in;
|
||||
in.s_addr = GetrIP();
|
||||
CoutTimestamp(true);
|
||||
std::cout << ": Logging outgoing TCP OldPacket. OPCode: 0x" << hex << setw(4) << setfill('0') << pack->opcode << dec << ", size: " << setw(5) << setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
|
||||
std::cout << ": Logging outgoing TCP OldPacket. OPCode: 0x" << std::hex << std::setw(4) << std::setfill('0') << pack->opcode << std::dec << ", size: " << std::setw(5) << std::setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
|
||||
#if TCPN_LOG_PACKETS == 2
|
||||
if (pack->size >= 32)
|
||||
DumpPacket(pack->pBuffer, 32);
|
||||
@ -198,7 +198,7 @@ bool EmuTCPConnection::SendPacket(ServerPacket* pack, uint32 iDestination) {
|
||||
struct in_addr in;
|
||||
in.s_addr = GetrIP();
|
||||
CoutTimestamp(true);
|
||||
std::cout << ": Logging outgoing TCP packet. OPCode: 0x" << hex << setw(4) << setfill('0') << pack->opcode << dec << ", size: " << setw(5) << setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
|
||||
std::cout << ": Logging outgoing TCP packet. OPCode: 0x" << std::hex << std::setw(4) << std::setfill('0') << pack->opcode << std::dec << ", size: " << std::setw(5) << std::setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
|
||||
#if TCPN_LOG_PACKETS == 2
|
||||
if (pack->size >= 32)
|
||||
DumpPacket(pack->pBuffer, 32);
|
||||
@ -237,7 +237,7 @@ bool EmuTCPConnection::SendPacket(EmuTCPNetPacket_Struct* tnps) {
|
||||
struct in_addr in;
|
||||
in.s_addr = GetrIP();
|
||||
CoutTimestamp(true);
|
||||
std::cout << ": Logging outgoing TCP NetPacket. OPCode: 0x" << hex << setw(4) << setfill('0') << tnps->opcode << dec << ", size: " << setw(5) << setfill(' ') << tnps->size << " " << inet_ntoa(in) << ":" << GetrPort();
|
||||
std::cout << ": Logging outgoing TCP NetPacket. OPCode: 0x" << std::hex << std::setw(4) << std::setfill('0') << tnps->opcode << std::dec << ", size: " << std::setw(5) << std::setfill(' ') << tnps->size << " " << inet_ntoa(in) << ":" << GetrPort();
|
||||
if (pOldFormat)
|
||||
std::cout << " (OldFormat)";
|
||||
std::cout << std::endl;
|
||||
@ -578,7 +578,7 @@ bool EmuTCPConnection::ProcessReceivedDataAsPackets(char* errbuf) {
|
||||
struct in_addr in;
|
||||
in.s_addr = GetrIP();
|
||||
CoutTimestamp(true);
|
||||
std::cout << ": Logging incoming TCP packet. OPCode: 0x" << hex << setw(4) << setfill('0') << pack->opcode << dec << ", size: " << setw(5) << setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
|
||||
std::cout << ": Logging incoming TCP packet. OPCode: 0x" << std::hex << std::setw(4) << std::setfill('0') << pack->opcode << std::dec << ", size: " << std::setw(5) << std::setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
|
||||
#if TCPN_LOG_PACKETS == 2
|
||||
if (pack->size >= 32)
|
||||
DumpPacket(pack->pBuffer, 32);
|
||||
@ -663,7 +663,7 @@ bool EmuTCPConnection::ProcessReceivedDataAsOldPackets(char* errbuf) {
|
||||
struct in_addr in;
|
||||
in.s_addr = GetrIP();
|
||||
CoutTimestamp(true);
|
||||
std::cout << ": Logging incoming TCP OldPacket. OPCode: 0x" << hex << setw(4) << setfill('0') << pack->opcode << dec << ", size: " << setw(5) << setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
|
||||
std::cout << ": Logging incoming TCP OldPacket. OPCode: 0x" << std::hex << std::setw(4) << std::setfill('0') << pack->opcode << std::dec << ", size: " << std::setw(5) << std::setfill(' ') << pack->size << " " << inet_ntoa(in) << ":" << GetrPort() << std::endl;
|
||||
#if TCPN_LOG_PACKETS == 2
|
||||
if (pack->size >= 32)
|
||||
DumpPacket(pack->pBuffer, 32);
|
||||
|
||||
@ -539,7 +539,7 @@ bool TCPConnection::Process() {
|
||||
if (!RecvData(errbuf)) {
|
||||
struct in_addr in;
|
||||
in.s_addr = GetrIP();
|
||||
//cout << inet_ntoa(in) << ":" << GetrPort() << ": " << errbuf << endl;
|
||||
//std::cout << inet_ntoa(in) << ":" << GetrPort() << ": " << errbuf << std::endl;
|
||||
return false;
|
||||
}
|
||||
/* we break to do the send */
|
||||
|
||||
@ -91,7 +91,7 @@ protected:
|
||||
T *data = *cur;
|
||||
if (data->IsFree() && (!data->CheckNetActive())) {
|
||||
#if EQN_DEBUG >= 4
|
||||
cout << "TCPConnection Connection deleted." << endl;
|
||||
std::cout << "TCPConnection Connection deleted." << std::endl;
|
||||
#endif
|
||||
delete data;
|
||||
cur = m_list.erase(cur);
|
||||
|
||||
@ -199,18 +199,18 @@ bool Database::CheckBannedIPs(const char* loginIP)
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
MYSQL_RES *result;
|
||||
//cout << "Checking against Banned IPs table."<< endl; //Lieka: Debugging
|
||||
//std::cout << "Checking against Banned IPs table."<< std::endl; //Lieka: Debugging
|
||||
if (RunQuery(query, MakeAnyLenString(&query, "SELECT ip_address FROM Banned_IPs WHERE ip_address='%s'", loginIP), errbuf, &result)) {
|
||||
safe_delete_array(query);
|
||||
if (mysql_num_rows(result) != 0)
|
||||
{
|
||||
//cout << loginIP << " was present in the banned IPs table" << endl; //Lieka: Debugging
|
||||
//std::cout << loginIP << " was present in the banned IPs table" << std::endl; //Lieka: Debugging
|
||||
mysql_free_result(result);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
//cout << loginIP << " was not present in the banned IPs table." << endl; //Lieka: Debugging
|
||||
//std::cout << loginIP << " was not present in the banned IPs table." << std::endl; //Lieka: Debugging
|
||||
mysql_free_result(result);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ bool EQTime::saveFile(const char *filename)
|
||||
return false;
|
||||
}
|
||||
//Enable for debugging
|
||||
//cout << "SAVE: day=" << (long)eqTime.start_eqtime.day << ";hour=" << (long)eqTime.start_eqtime.hour << ";min=" << (long)eqTime.start_eqtime.minute << ";mon=" << (long)eqTime.start_eqtime.month << ";yr=" << eqTime.start_eqtime.year << ";timet=" << eqTime.start_realtime << endl;
|
||||
//std::cout << "SAVE: day=" << (long)eqTime.start_eqtime.day << ";hour=" << (long)eqTime.start_eqtime.hour << ";min=" << (long)eqTime.start_eqtime.minute << ";mon=" << (long)eqTime.start_eqtime.month << ";yr=" << eqTime.start_eqtime.year << ";timet=" << eqTime.start_realtime << std::endl;
|
||||
of << EQT_VERSION << std::endl;
|
||||
of << (long)eqTime.start_eqtime.day << std::endl;
|
||||
of << (long)eqTime.start_eqtime.hour << std::endl;
|
||||
@ -194,7 +194,7 @@ bool EQTime::loadFile(const char *filename)
|
||||
in.ignore(80, '\n');
|
||||
in >> eqTime.start_realtime;
|
||||
//Enable for debugging...
|
||||
//cout << "LOAD: day=" << (long)eqTime.start_eqtime.day << ";hour=" << (long)eqTime.start_eqtime.hour << ";min=" << (long)eqTime.start_eqtime.minute << ";mon=" << (long)eqTime.start_eqtime.month << ";yr=" << eqTime.start_eqtime.year << ";timet=" << eqTime.start_realtime << endl;
|
||||
//std::cout << "LOAD: day=" << (long)eqTime.start_eqtime.day << ";hour=" << (long)eqTime.start_eqtime.hour << ";min=" << (long)eqTime.start_eqtime.minute << ";mon=" << (long)eqTime.start_eqtime.month << ";yr=" << eqTime.start_eqtime.year << ";timet=" << eqTime.start_realtime << std::endl;
|
||||
in.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -337,7 +337,7 @@ ListElement<TYPE>::ListElement(const TYPE& d)
|
||||
template<class TYPE>
|
||||
ListElement<TYPE>::~ListElement()
|
||||
{
|
||||
// cout << "ListElement<TYPE>::~ListElement()" << endl;
|
||||
// std::cout << "ListElement<TYPE>::~ListElement()" << std::endl;
|
||||
|
||||
if (data != 0)
|
||||
safe_delete(data);
|
||||
|
||||
@ -78,7 +78,7 @@ void DumpPacketHex(const uchar* buf, uint32 size, uint32 cols, uint32 skip) {
|
||||
else {
|
||||
ascii[j++] = '.';
|
||||
}
|
||||
// cout << setfill(0) << setw(2) << hex << (int)buf[i] << " ";
|
||||
// std::cout << std::setfill(0) << std::setw(2) << std::hex << (int)buf[i] << " "; // unknown intent [CODEBUG]
|
||||
}
|
||||
uint32 k = ((i-skip)-1)%cols;
|
||||
if (k < 8)
|
||||
|
||||
@ -80,7 +80,7 @@ void oldFileDumpPacketHex(const char* filename, const uchar* buf, uint32 size, u
|
||||
}
|
||||
sprintf(output, "%02X ",(unsigned char)buf[i]);
|
||||
logfile << output;
|
||||
// logfile << setfill(0) << setw(2) << hex << (int)buf[i] << " ";
|
||||
//logfile << std::setfill(0) << std::setw(2) << std::hex << (int)buf[i] << " "; // unknown intent [CODEBUG]
|
||||
}
|
||||
logfile << std::endl << std::endl;
|
||||
}
|
||||
@ -115,7 +115,7 @@ void FileDumpPacketHex(const char* filename, const uchar* buf, uint32 size, uint
|
||||
else {
|
||||
ascii[j++] = '.';
|
||||
}
|
||||
// logfile << setfill(0) << setw(2) << hex << (int)buf[i] << " ";
|
||||
//logfile << std::setfill(0) << std::setw(2) << std::hex << (int)buf[i] << " "; // unknown intent [CODEBUG]
|
||||
}
|
||||
uint32 k = ((i-skip)-1)%cols;
|
||||
if (k < 8)
|
||||
|
||||
@ -57,7 +57,7 @@ public:
|
||||
return;
|
||||
|
||||
for (i=0; i<len; i++) {
|
||||
// cout << i << ": 0x" << hex << (int) message[i] << dec << " " << message[i] << endl;
|
||||
// std::cout << i << ": 0x" << std::hex << (int) message[i] << std::dec << " " << message[i] << std::endl; // undefined cout [CODEBUG]
|
||||
if (inarg) {
|
||||
if ((inquote == false && (message[i] == div || message[i] == div2 || message[i] == div3)) || (inquote && (message[i] == '\'' || message[i] == '\"') && (message[i+1] == div || message[i+1] == div2 || message[i+1] == div3 || message[i+1] == 0))) {
|
||||
inquote = false;
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
#include "QuestParserCollection.h"
|
||||
#include <math.h>
|
||||
#include <assert.h>
|
||||
#include <iostream>
|
||||
#ifndef WIN32
|
||||
#include <stdlib.h>
|
||||
#include "../common/unix.h"
|
||||
@ -531,7 +532,7 @@ void Client::AddItemBonuses(const ItemInst *inst, StatBonuses* newbon, bool isAu
|
||||
|
||||
void Client::CalcEdibleBonuses(StatBonuses* newbon) {
|
||||
#if EQDEBUG >= 11
|
||||
cout<<"Client::CalcEdibleBonuses(StatBonuses* newbon)"<<endl;
|
||||
std::cout<<"Client::CalcEdibleBonuses(StatBonuses* newbon)"<<std::endl;
|
||||
#endif
|
||||
// Search player slots for skill=14(food) and skill=15(drink)
|
||||
uint32 i;
|
||||
|
||||
@ -978,7 +978,7 @@ bool Bot::AI_IdleCastCheck() {
|
||||
|
||||
if (AIautocastspell_timer->Check(false)) {
|
||||
#if MobAI_DEBUG_Spells >= 25
|
||||
cout << "Non-Engaged autocast check triggered: " << this->GetCleanName() << endl;
|
||||
std::cout << "Non-Engaged autocast check triggered: " << this->GetCleanName() << std::endl; // cout undefine [CODEBUG]
|
||||
#endif
|
||||
AIautocastspell_timer->Disable(); //prevent the timer from going off AGAIN while we are casting.
|
||||
|
||||
|
||||
@ -721,7 +721,7 @@ void Client::QueuePacket(const EQApplicationPacket* app, bool ack_req, CLIENT_CO
|
||||
|
||||
void Client::FastQueuePacket(EQApplicationPacket** app, bool ack_req, CLIENT_CONN_STATUS required_state) {
|
||||
|
||||
//cout << "Sending: 0x" << hex << setw(4) << setfill('0') << (*app)->GetOpcode() << dec << ", size=" << (*app)->size << endl;
|
||||
//std::cout << "Sending: 0x" << std::hex << std::setw(4) << std::setfill('0') << (*app)->GetOpcode() << std::dec << ", size=" << (*app)->size << std::endl;
|
||||
|
||||
// if the program doesnt care about the status or if the status isnt what we requested
|
||||
if (required_state != CLIENT_CONNECTINGALL && client_state != required_state) {
|
||||
@ -1745,7 +1745,7 @@ void Client::SendManaUpdatePacket() {
|
||||
SendEnduranceUpdate();
|
||||
}
|
||||
|
||||
//cout << "Sending mana update: " << (cur_mana - last_reported_mana) << endl;
|
||||
//std::cout << "Sending mana update: " << (cur_mana - last_reported_mana) << std::endl;
|
||||
if (last_reported_mana != cur_mana || last_reported_endur != cur_end) {
|
||||
|
||||
|
||||
|
||||
@ -414,14 +414,14 @@ int Client::HandlePacket(const EQApplicationPacket *app)
|
||||
}
|
||||
|
||||
#if EQDEBUG >= 9
|
||||
std::cout << "Received 0x" << hex << setw(4) << setfill('0') << opcode << ", size=" << dec << app->size << std::endl;
|
||||
std::cout << "Received 0x" << std::hex << std::setw(4) << std::setfill('0') << opcode << ", size=" << std::dec << app->size << std::endl;
|
||||
#endif
|
||||
|
||||
#ifdef SOLAR
|
||||
if(0 && opcode != OP_ClientUpdate)
|
||||
{
|
||||
LogFile->write(EQEMuLog::Debug,"HandlePacket() OPCODE debug enabled client %s", GetName());
|
||||
std::cerr << "OPCODE: " << hex << setw(4) << setfill('0') << opcode << dec << ", size: " << app->size << std::endl;
|
||||
std::cerr << "OPCODE: " << std::hex << std::setw(4) << std::setfill('0') << opcode << std::dec << ", size: " << app->size << std::endl;
|
||||
DumpPacket(app);
|
||||
}
|
||||
#endif
|
||||
@ -2973,7 +2973,7 @@ void Client::Handle_OP_SpawnAppearance(const EQApplicationPacket *app)
|
||||
/*
|
||||
else if (sa->parameter == 0x05) {
|
||||
// Illusion
|
||||
cout << "Illusion packet recv'd:" << endl;
|
||||
std::cout << "Illusion packet recv'd:" << std::endl;
|
||||
DumpPacket(app);
|
||||
}
|
||||
*/
|
||||
@ -8708,7 +8708,7 @@ bool Client::FinishConnState2(DBAsyncWork* dbaw) {
|
||||
|
||||
//uint32 aalen = database.GetPlayerAlternateAdv(account_id, name, &aa);
|
||||
//if (aalen == 0) {
|
||||
// cout << "Client dropped: !GetPlayerAlternateAdv, name=" << name << endl;
|
||||
// std::cout << "Client dropped: !GetPlayerAlternateAdv, name=" << name << std::endl;
|
||||
// return false;
|
||||
//}
|
||||
|
||||
|
||||
@ -130,7 +130,7 @@ Trap* Entity::CastToTrap()
|
||||
#ifdef DEBUG
|
||||
if(!IsTrap())
|
||||
{
|
||||
//cout << "CastToTrap error" << endl;
|
||||
//std::cout << "CastToTrap error" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@ -161,7 +161,7 @@ Object* Entity::CastToObject() {
|
||||
/*Group* Entity::CastToGroup() {
|
||||
#ifdef _EQDEBUG
|
||||
if(!IsGroup()) {
|
||||
cout << "CastToGroup error" << endl;
|
||||
std::cout << "CastToGroup error" << std::endl;
|
||||
DebugBreak();
|
||||
return 0;
|
||||
}
|
||||
@ -230,7 +230,7 @@ const Trap* Entity::CastToTrap() const {
|
||||
#ifdef DEBUG
|
||||
if(!IsTrap())
|
||||
{
|
||||
//cout << "CastToTrap error" << endl;
|
||||
//std::cout << "CastToTrap error" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
// This file needs more than just 'std' updates
|
||||
|
||||
uint16 Mob::MaxSkill_weapon(uint16 skillid, uint16 class_, uint16 level) const{
|
||||
if (skillid > HIGHEST_SKILL)
|
||||
return 0;
|
||||
@ -273,7 +275,7 @@ uint16 Mob::MaxSkill_weapon(uint16 skillid, uint16 class_, uint16 level) const{
|
||||
}
|
||||
default:
|
||||
#if EQDEBUG
|
||||
cout<<"MaxSkill_Weapon() Unknown class: "<<class_<<endl;
|
||||
std::cout<<"MaxSkill_Weapon() Unknown class: "<<class_<<std::endl;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
@ -281,7 +283,7 @@ uint16 Mob::MaxSkill_weapon(uint16 skillid, uint16 class_, uint16 level) const{
|
||||
}
|
||||
default:
|
||||
#if EQDEBUG
|
||||
cout<<"Unknown weapon skill: "<<skillid<<endl;
|
||||
std::cout<<"Unknown weapon skill: "<<skillid<<std::endl;
|
||||
#endif
|
||||
break;
|
||||
}// Switch skill
|
||||
@ -812,7 +814,7 @@ uint16 Mob::MaxSkill_offensive(uint16 skillid, uint16 class_, uint16 level) cons
|
||||
////////////////////////////////////////////////////////
|
||||
default:
|
||||
#if EQDEBUG >= 1
|
||||
cout<<"Unknown Offensive skill: "<<skillid<<endl;
|
||||
std::cout<<"Unknown Offensive skill: "<<skillid<<std::endl;
|
||||
#endif
|
||||
break;
|
||||
}// Switch skill
|
||||
@ -1351,7 +1353,7 @@ uint16 Mob::MaxSkill_defensive(uint16 skillid, uint16 class_, uint16 level) cons
|
||||
|
||||
default:
|
||||
#if EQDEBUG
|
||||
cout<<"Unknown Defensive skill: "<<skillid<<endl;
|
||||
std::cout<<"Unknown Defensive skill: "<<skillid<<std::endl;
|
||||
#endif
|
||||
break;
|
||||
}// Switch skill
|
||||
@ -1613,7 +1615,7 @@ uint16 Mob::MaxSkill_arcane(uint16 skillid, uint16 class_, uint16 level) const{
|
||||
////////////////////////////////////////////////////////
|
||||
default:
|
||||
#if EQDEBUG
|
||||
cout<<"Unknown arcane skill: "<<skillid<<endl;
|
||||
std::cout<<"Unknown arcane skill: "<<skillid<<std::endl;
|
||||
#endif
|
||||
break;
|
||||
}// Switch skill
|
||||
@ -2069,7 +2071,7 @@ uint16 Mob::MaxSkill_class(uint16 skillid, uint16 class_, uint16 level) const{
|
||||
////////////////////////////////////////////////////////
|
||||
default:
|
||||
#if EQDEBUG
|
||||
cout<<"Unknown class skill: "<<skillid<<endl;
|
||||
std::cout<<"Unknown class skill: "<<skillid<<std::endl;
|
||||
#endif
|
||||
break;
|
||||
}// Switch skill
|
||||
|
||||
@ -1546,7 +1546,7 @@ void Mob::SendIllusionPacket(uint16 in_race, uint8 in_gender, uint8 in_texture,
|
||||
}
|
||||
|
||||
uint8 Mob::GetDefaultGender(uint16 in_race, uint8 in_gender) {
|
||||
//cout << "Gender in: " << (int)in_gender << endl;
|
||||
//std::cout << "Gender in: " << (int)in_gender << std::endl; // undefined cout [CODEBUG]
|
||||
if ((in_race > 0 && in_race <= GNOME )
|
||||
|| in_race == IKSAR || in_race == VAHSHIR || in_race == FROGLOK || in_race == DRAKKIN
|
||||
|| in_race == 15 || in_race == 50 || in_race == 57 || in_race == 70 || in_race == 98 || in_race == 118) {
|
||||
@ -2775,7 +2775,7 @@ int16 Mob::GetResist(uint8 type) const
|
||||
|
||||
uint32 Mob::GetLevelHP(uint8 tlevel)
|
||||
{
|
||||
//cout<<"Tlevel: "<<(int)tlevel<<endl;
|
||||
//std::cout<<"Tlevel: "<<(int)tlevel<<std::endl; // cout undefined [CODEBUG]
|
||||
int multiplier = 0;
|
||||
if (tlevel < 10)
|
||||
{
|
||||
|
||||
@ -444,7 +444,7 @@ void NPC::RemoveItem(uint32 item_id, uint16 quantity, uint16 slot) {
|
||||
return;
|
||||
}
|
||||
else if (item->item_id == item_id && item->equipSlot == slot && quantity >= 1) {
|
||||
//cout<<"NPC::RemoveItem"<<" equipSlot:"<<iterator.GetData()->equipSlot<<" quantity:"<< quantity<<endl;
|
||||
//std::cout<<"NPC::RemoveItem"<<" equipSlot:"<<iterator.GetData()->equipSlot<<" quantity:"<< quantity<<std::endl; // iterator undefined [CODEBUG]
|
||||
if (item->charges <= quantity)
|
||||
itemlist.erase(cur);
|
||||
else
|
||||
|
||||
@ -21,11 +21,11 @@ void DispatchFinishedDBAsync(DBAsyncWork* dbaw) {
|
||||
if (dbaq->GetAnswer(errbuf, result))
|
||||
database.LoadVariables_result(result);
|
||||
else
|
||||
cout << "Async DB.LoadVariables() failed: '" << errbuf << "'" << endl;
|
||||
std::cout << "Async DB.LoadVariables() failed: '" << errbuf << "'" << std::endl;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
cout << "Error: DispatchFinishedDBAsync(): Unknown workpt.b4" << endl;
|
||||
std::cout << "Error: DispatchFinishedDBAsync(): Unknown workpt.b4" << std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -119,7 +119,7 @@ bool DBAsyncCB_CharacterBackup(DBAsyncWork* iWork) { // return true means delete
|
||||
}
|
||||
}
|
||||
else {
|
||||
// cout << "Error in DBAsyncCB_CharacterBackup query1 '" << query << "' " << errbuf << endl;
|
||||
// std::cout << "Error in DBAsyncCB_CharacterBackup query1 '" << query << "' " << errbuf << std::endl;
|
||||
safe_delete_array(query);
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user