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:
Uleat 2013-10-27 03:13:10 -04:00
parent b4068823ed
commit cab77e83da
22 changed files with 67 additions and 56 deletions

View File

@ -1,5 +1,13 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50) 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 == == 10/24/2013 ==
demonstar55: Fix some memory leaks in Mob::SpellOnTarget demonstar55: Fix some memory leaks in Mob::SpellOnTarget

View File

@ -343,7 +343,7 @@ bool valid=false;
uint16 packet_crc=ntohs(*(const uint16 *)(buffer+length-2)); uint16 packet_crc=ntohs(*(const uint16 *)(buffer+length-2));
#ifdef EQN_DEBUG #ifdef EQN_DEBUG
if (packet_crc && comp_crc != packet_crc) { 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 #endif
valid = (!packet_crc || comp_crc == packet_crc); valid = (!packet_crc || comp_crc == packet_crc);

View File

@ -326,7 +326,7 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
break; break;
} }
#endif #endif
//cout << "Got OP_SessionRequest" << endl; //std::cout << "Got OP_SessionRequest" << std::endl;
init(); init();
OutboundQueueClear(); OutboundQueueClear();
SessionRequest *Request=(SessionRequest *)p->pBuffer; SessionRequest *Request=(SessionRequest *)p->pBuffer;
@ -654,7 +654,7 @@ void EQStream::Write(int eq_fd)
int32 threshold=RateThreshold; int32 threshold=RateThreshold;
MRate.unlock(); MRate.unlock();
if (BytesWritten > threshold) { if (BytesWritten > threshold) {
//cout << "Over threshold: " << BytesWritten << " > " << threshold << endl; //std::cout << "Over threshold: " << BytesWritten << " > " << threshold << std::endl;
return; return;
} }
@ -848,15 +848,15 @@ sockaddr_in address;
address.sin_port=remote_port; address.sin_port=remote_port;
#ifdef NOWAY #ifdef NOWAY
uint32 ip=address.sin_addr.s_addr; uint32 ip=address.sin_addr.s_addr;
cout << "Sending to: " std::cout << "Sending to: "
<< (int)*(unsigned char *)&ip << (int)*(unsigned char *)&ip
<< "." << (int)*((unsigned char *)&ip+1) << "." << (int)*((unsigned char *)&ip+1)
<< "." << (int)*((unsigned char *)&ip+2) << "." << (int)*((unsigned char *)&ip+2)
<< "." << (int)*((unsigned char *)&ip+3) << "." << (int)*((unsigned char *)&ip+3)
<< "," << (int)ntohs(address.sin_port) << "(" << p->size << ")" << endl; << "," << (int)ntohs(address.sin_port) << "(" << p->size << ")" << std::endl;
p->DumpRaw(); p->DumpRaw();
cout << "-------------" << endl; std::cout << "-------------" << std::endl;
#endif #endif
length=p->serialize(buffer); length=p->serialize(buffer);
if (p->opcode!=OP_SessionRequest && p->opcode!=OP_SessionResponse) { if (p->opcode!=OP_SessionRequest && p->opcode!=OP_SessionResponse) {
@ -907,7 +907,7 @@ char temp[15];
*((unsigned char *)&ip+2), *((unsigned char *)&ip+2),
*((unsigned char *)&ip+3), *((unsigned char *)&ip+3),
ntohs(from->sin_port)); 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()); //dump_message(p->pBuffer,p->size,timestamp());
} }

View File

@ -104,8 +104,8 @@ struct sockaddr_in address;
fcntl(sock, F_SETFL, O_NONBLOCK); fcntl(sock, F_SETFL, O_NONBLOCK);
#endif #endif
//moved these because on windows the output was delayed and causing the console window to look bad //moved these because on windows the output was delayed and causing the console window to look bad
//cout << "Starting factory Reader" << endl; //std::cout << "Starting factory Reader" << std::endl;
//cout << "Starting factory Writer" << endl; //std::cout << "Starting factory Writer" << std::endl;
#ifdef _WINDOWS #ifdef _WINDOWS
_beginthread(EQStreamFactoryReaderLoop,0, this); _beginthread(EQStreamFactoryReaderLoop,0, this);
_beginthread(EQStreamFactoryWriterLoop,0, this); _beginthread(EQStreamFactoryWriterLoop,0, this);
@ -119,7 +119,7 @@ struct sockaddr_in address;
EQStream *EQStreamFactory::Pop() EQStream *EQStreamFactory::Pop()
{ {
EQStream *s=nullptr; EQStream *s=nullptr;
//cout << "Pop():Locking MNewStreams" << endl; //std::cout << "Pop():Locking MNewStreams" << std::endl;
MNewStreams.lock(); MNewStreams.lock();
if (NewStreams.size()) { if (NewStreams.size()) {
s=NewStreams.front(); s=NewStreams.front();
@ -127,18 +127,18 @@ EQStream *s=nullptr;
s->PutInUse(); s->PutInUse();
} }
MNewStreams.unlock(); MNewStreams.unlock();
//cout << "Pop(): Unlocking MNewStreams" << endl; //std::cout << "Pop(): Unlocking MNewStreams" << std::endl;
return s; return s;
} }
void EQStreamFactory::Push(EQStream *s) void EQStreamFactory::Push(EQStream *s)
{ {
//cout << "Push():Locking MNewStreams" << endl; //std::cout << "Push():Locking MNewStreams" << std::endl;
MNewStreams.lock(); MNewStreams.lock();
NewStreams.push(s); NewStreams.push(s);
MNewStreams.unlock(); MNewStreams.unlock();
//cout << "Push(): Unlocking MNewStreams" << endl; //std::cout << "Push(): Unlocking MNewStreams" << std::endl;
} }
void EQStreamFactory::ReaderLoop() void EQStreamFactory::ReaderLoop()
@ -240,7 +240,7 @@ void EQStreamFactory::CheckTimeout()
//give it a little time for everybody to finish with it //give it a little time for everybody to finish with it
} else { } else {
//everybody is done, we can delete it now //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; std::map<std::string,EQStream *>::iterator temp=stream_itr;
stream_itr++; stream_itr++;
//let whoever has the stream outside delete it //let whoever has the stream outside delete it
@ -318,9 +318,9 @@ Timer DecayTimer(20);
stream_count=Streams.size(); stream_count=Streams.size();
MStreams.unlock(); MStreams.unlock();
if (!stream_count) { if (!stream_count) {
//cout << "No streams, waiting on condition" << endl; //std::cout << "No streams, waiting on condition" << std::endl;
WriterWork.Wait(); WriterWork.Wait();
//cout << "Awake from condition, must have a stream now" << endl; //std::cout << "Awake from condition, must have a stream now" << std::endl;
} }
} }
} }

View File

@ -171,7 +171,7 @@ bool EmuTCPConnection::SendPacket(ServerPacket* pack, uint32 iDestination) {
struct in_addr in; struct in_addr in;
in.s_addr = GetrIP(); in.s_addr = GetrIP();
CoutTimestamp(true); 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 TCPN_LOG_PACKETS == 2
if (pack->size >= 32) if (pack->size >= 32)
DumpPacket(pack->pBuffer, 32); DumpPacket(pack->pBuffer, 32);
@ -198,7 +198,7 @@ bool EmuTCPConnection::SendPacket(ServerPacket* pack, uint32 iDestination) {
struct in_addr in; struct in_addr in;
in.s_addr = GetrIP(); in.s_addr = GetrIP();
CoutTimestamp(true); 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 TCPN_LOG_PACKETS == 2
if (pack->size >= 32) if (pack->size >= 32)
DumpPacket(pack->pBuffer, 32); DumpPacket(pack->pBuffer, 32);
@ -237,7 +237,7 @@ bool EmuTCPConnection::SendPacket(EmuTCPNetPacket_Struct* tnps) {
struct in_addr in; struct in_addr in;
in.s_addr = GetrIP(); in.s_addr = GetrIP();
CoutTimestamp(true); 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) if (pOldFormat)
std::cout << " (OldFormat)"; std::cout << " (OldFormat)";
std::cout << std::endl; std::cout << std::endl;
@ -578,7 +578,7 @@ bool EmuTCPConnection::ProcessReceivedDataAsPackets(char* errbuf) {
struct in_addr in; struct in_addr in;
in.s_addr = GetrIP(); in.s_addr = GetrIP();
CoutTimestamp(true); 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 TCPN_LOG_PACKETS == 2
if (pack->size >= 32) if (pack->size >= 32)
DumpPacket(pack->pBuffer, 32); DumpPacket(pack->pBuffer, 32);
@ -663,7 +663,7 @@ bool EmuTCPConnection::ProcessReceivedDataAsOldPackets(char* errbuf) {
struct in_addr in; struct in_addr in;
in.s_addr = GetrIP(); in.s_addr = GetrIP();
CoutTimestamp(true); 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 TCPN_LOG_PACKETS == 2
if (pack->size >= 32) if (pack->size >= 32)
DumpPacket(pack->pBuffer, 32); DumpPacket(pack->pBuffer, 32);

View File

@ -539,7 +539,7 @@ bool TCPConnection::Process() {
if (!RecvData(errbuf)) { if (!RecvData(errbuf)) {
struct in_addr in; struct in_addr in;
in.s_addr = GetrIP(); in.s_addr = GetrIP();
//cout << inet_ntoa(in) << ":" << GetrPort() << ": " << errbuf << endl; //std::cout << inet_ntoa(in) << ":" << GetrPort() << ": " << errbuf << std::endl;
return false; return false;
} }
/* we break to do the send */ /* we break to do the send */

View File

@ -91,7 +91,7 @@ protected:
T *data = *cur; T *data = *cur;
if (data->IsFree() && (!data->CheckNetActive())) { if (data->IsFree() && (!data->CheckNetActive())) {
#if EQN_DEBUG >= 4 #if EQN_DEBUG >= 4
cout << "TCPConnection Connection deleted." << endl; std::cout << "TCPConnection Connection deleted." << std::endl;
#endif #endif
delete data; delete data;
cur = m_list.erase(cur); cur = m_list.erase(cur);

View File

@ -199,18 +199,18 @@ bool Database::CheckBannedIPs(const char* loginIP)
char errbuf[MYSQL_ERRMSG_SIZE]; char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0; char *query = 0;
MYSQL_RES *result; 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)) { if (RunQuery(query, MakeAnyLenString(&query, "SELECT ip_address FROM Banned_IPs WHERE ip_address='%s'", loginIP), errbuf, &result)) {
safe_delete_array(query); safe_delete_array(query);
if (mysql_num_rows(result) != 0) 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); mysql_free_result(result);
return true; return true;
} }
else 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); mysql_free_result(result);
return false; return false;
} }

View File

@ -144,7 +144,7 @@ bool EQTime::saveFile(const char *filename)
return false; return false;
} }
//Enable for debugging //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 << EQT_VERSION << std::endl;
of << (long)eqTime.start_eqtime.day << std::endl; of << (long)eqTime.start_eqtime.day << std::endl;
of << (long)eqTime.start_eqtime.hour << 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.ignore(80, '\n');
in >> eqTime.start_realtime; in >> eqTime.start_realtime;
//Enable for debugging... //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(); in.close();
return true; return true;
} }

View File

@ -337,7 +337,7 @@ ListElement<TYPE>::ListElement(const TYPE& d)
template<class TYPE> template<class TYPE>
ListElement<TYPE>::~ListElement() ListElement<TYPE>::~ListElement()
{ {
// cout << "ListElement<TYPE>::~ListElement()" << endl; // std::cout << "ListElement<TYPE>::~ListElement()" << std::endl;
if (data != 0) if (data != 0)
safe_delete(data); safe_delete(data);

View File

@ -78,7 +78,7 @@ void DumpPacketHex(const uchar* buf, uint32 size, uint32 cols, uint32 skip) {
else { else {
ascii[j++] = '.'; 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; uint32 k = ((i-skip)-1)%cols;
if (k < 8) if (k < 8)

View File

@ -80,7 +80,7 @@ void oldFileDumpPacketHex(const char* filename, const uchar* buf, uint32 size, u
} }
sprintf(output, "%02X ",(unsigned char)buf[i]); sprintf(output, "%02X ",(unsigned char)buf[i]);
logfile << output; 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; logfile << std::endl << std::endl;
} }
@ -115,7 +115,7 @@ void FileDumpPacketHex(const char* filename, const uchar* buf, uint32 size, uint
else { else {
ascii[j++] = '.'; 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; uint32 k = ((i-skip)-1)%cols;
if (k < 8) if (k < 8)

View File

@ -57,7 +57,7 @@ public:
return; return;
for (i=0; i<len; i++) { 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 (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))) { 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; inquote = false;

View File

@ -29,6 +29,7 @@
#include "QuestParserCollection.h" #include "QuestParserCollection.h"
#include <math.h> #include <math.h>
#include <assert.h> #include <assert.h>
#include <iostream>
#ifndef WIN32 #ifndef WIN32
#include <stdlib.h> #include <stdlib.h>
#include "../common/unix.h" #include "../common/unix.h"
@ -531,7 +532,7 @@ void Client::AddItemBonuses(const ItemInst *inst, StatBonuses* newbon, bool isAu
void Client::CalcEdibleBonuses(StatBonuses* newbon) { void Client::CalcEdibleBonuses(StatBonuses* newbon) {
#if EQDEBUG >= 11 #if EQDEBUG >= 11
cout<<"Client::CalcEdibleBonuses(StatBonuses* newbon)"<<endl; std::cout<<"Client::CalcEdibleBonuses(StatBonuses* newbon)"<<std::endl;
#endif #endif
// Search player slots for skill=14(food) and skill=15(drink) // Search player slots for skill=14(food) and skill=15(drink)
uint32 i; uint32 i;

View File

@ -978,7 +978,7 @@ bool Bot::AI_IdleCastCheck() {
if (AIautocastspell_timer->Check(false)) { if (AIautocastspell_timer->Check(false)) {
#if MobAI_DEBUG_Spells >= 25 #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 #endif
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.

View File

@ -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) { 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 the program doesnt care about the status or if the status isnt what we requested
if (required_state != CLIENT_CONNECTINGALL && client_state != required_state) { if (required_state != CLIENT_CONNECTINGALL && client_state != required_state) {
@ -1745,7 +1745,7 @@ void Client::SendManaUpdatePacket() {
SendEnduranceUpdate(); 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) { if (last_reported_mana != cur_mana || last_reported_endur != cur_end) {

View File

@ -414,14 +414,14 @@ int Client::HandlePacket(const EQApplicationPacket *app)
} }
#if EQDEBUG >= 9 #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 #endif
#ifdef SOLAR #ifdef SOLAR
if(0 && opcode != OP_ClientUpdate) if(0 && opcode != OP_ClientUpdate)
{ {
LogFile->write(EQEMuLog::Debug,"HandlePacket() OPCODE debug enabled client %s", GetName()); 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); DumpPacket(app);
} }
#endif #endif
@ -2973,7 +2973,7 @@ void Client::Handle_OP_SpawnAppearance(const EQApplicationPacket *app)
/* /*
else if (sa->parameter == 0x05) { else if (sa->parameter == 0x05) {
// Illusion // Illusion
cout << "Illusion packet recv'd:" << endl; std::cout << "Illusion packet recv'd:" << std::endl;
DumpPacket(app); DumpPacket(app);
} }
*/ */
@ -8708,7 +8708,7 @@ bool Client::FinishConnState2(DBAsyncWork* dbaw) {
//uint32 aalen = database.GetPlayerAlternateAdv(account_id, name, &aa); //uint32 aalen = database.GetPlayerAlternateAdv(account_id, name, &aa);
//if (aalen == 0) { //if (aalen == 0) {
// cout << "Client dropped: !GetPlayerAlternateAdv, name=" << name << endl; // std::cout << "Client dropped: !GetPlayerAlternateAdv, name=" << name << std::endl;
// return false; // return false;
//} //}

View File

@ -130,7 +130,7 @@ Trap* Entity::CastToTrap()
#ifdef DEBUG #ifdef DEBUG
if(!IsTrap()) if(!IsTrap())
{ {
//cout << "CastToTrap error" << endl; //std::cout << "CastToTrap error" << std::endl;
return 0; return 0;
} }
#endif #endif
@ -161,7 +161,7 @@ Object* Entity::CastToObject() {
/*Group* Entity::CastToGroup() { /*Group* Entity::CastToGroup() {
#ifdef _EQDEBUG #ifdef _EQDEBUG
if(!IsGroup()) { if(!IsGroup()) {
cout << "CastToGroup error" << endl; std::cout << "CastToGroup error" << std::endl;
DebugBreak(); DebugBreak();
return 0; return 0;
} }
@ -230,7 +230,7 @@ const Trap* Entity::CastToTrap() const {
#ifdef DEBUG #ifdef DEBUG
if(!IsTrap()) if(!IsTrap())
{ {
//cout << "CastToTrap error" << endl; //std::cout << "CastToTrap error" << std::endl;
return 0; return 0;
} }
#endif #endif

View File

@ -1,3 +1,5 @@
// This file needs more than just 'std' updates
uint16 Mob::MaxSkill_weapon(uint16 skillid, uint16 class_, uint16 level) const{ uint16 Mob::MaxSkill_weapon(uint16 skillid, uint16 class_, uint16 level) const{
if (skillid > HIGHEST_SKILL) if (skillid > HIGHEST_SKILL)
return 0; return 0;
@ -273,7 +275,7 @@ uint16 Mob::MaxSkill_weapon(uint16 skillid, uint16 class_, uint16 level) const{
} }
default: default:
#if EQDEBUG #if EQDEBUG
cout<<"MaxSkill_Weapon() Unknown class: "<<class_<<endl; std::cout<<"MaxSkill_Weapon() Unknown class: "<<class_<<std::endl;
#endif #endif
break; break;
} }
@ -281,7 +283,7 @@ uint16 Mob::MaxSkill_weapon(uint16 skillid, uint16 class_, uint16 level) const{
} }
default: default:
#if EQDEBUG #if EQDEBUG
cout<<"Unknown weapon skill: "<<skillid<<endl; std::cout<<"Unknown weapon skill: "<<skillid<<std::endl;
#endif #endif
break; break;
}// Switch skill }// Switch skill
@ -812,7 +814,7 @@ uint16 Mob::MaxSkill_offensive(uint16 skillid, uint16 class_, uint16 level) cons
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
default: default:
#if EQDEBUG >= 1 #if EQDEBUG >= 1
cout<<"Unknown Offensive skill: "<<skillid<<endl; std::cout<<"Unknown Offensive skill: "<<skillid<<std::endl;
#endif #endif
break; break;
}// Switch skill }// Switch skill
@ -1351,7 +1353,7 @@ uint16 Mob::MaxSkill_defensive(uint16 skillid, uint16 class_, uint16 level) cons
default: default:
#if EQDEBUG #if EQDEBUG
cout<<"Unknown Defensive skill: "<<skillid<<endl; std::cout<<"Unknown Defensive skill: "<<skillid<<std::endl;
#endif #endif
break; break;
}// Switch skill }// Switch skill
@ -1613,7 +1615,7 @@ uint16 Mob::MaxSkill_arcane(uint16 skillid, uint16 class_, uint16 level) const{
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
default: default:
#if EQDEBUG #if EQDEBUG
cout<<"Unknown arcane skill: "<<skillid<<endl; std::cout<<"Unknown arcane skill: "<<skillid<<std::endl;
#endif #endif
break; break;
}// Switch skill }// Switch skill
@ -2069,7 +2071,7 @@ uint16 Mob::MaxSkill_class(uint16 skillid, uint16 class_, uint16 level) const{
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
default: default:
#if EQDEBUG #if EQDEBUG
cout<<"Unknown class skill: "<<skillid<<endl; std::cout<<"Unknown class skill: "<<skillid<<std::endl;
#endif #endif
break; break;
}// Switch skill }// Switch skill

View File

@ -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) { 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 ) if ((in_race > 0 && in_race <= GNOME )
|| in_race == IKSAR || in_race == VAHSHIR || in_race == FROGLOK || in_race == DRAKKIN || 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) { || 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) uint32 Mob::GetLevelHP(uint8 tlevel)
{ {
//cout<<"Tlevel: "<<(int)tlevel<<endl; //std::cout<<"Tlevel: "<<(int)tlevel<<std::endl; // cout undefined [CODEBUG]
int multiplier = 0; int multiplier = 0;
if (tlevel < 10) if (tlevel < 10)
{ {

View File

@ -444,7 +444,7 @@ void NPC::RemoveItem(uint32 item_id, uint16 quantity, uint16 slot) {
return; return;
} }
else if (item->item_id == item_id && item->equipSlot == slot && quantity >= 1) { 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) if (item->charges <= quantity)
itemlist.erase(cur); itemlist.erase(cur);
else else

View File

@ -21,11 +21,11 @@ void DispatchFinishedDBAsync(DBAsyncWork* dbaw) {
if (dbaq->GetAnswer(errbuf, result)) if (dbaq->GetAnswer(errbuf, result))
database.LoadVariables_result(result); database.LoadVariables_result(result);
else else
cout << "Async DB.LoadVariables() failed: '" << errbuf << "'" << endl; std::cout << "Async DB.LoadVariables() failed: '" << errbuf << "'" << std::endl;
break; break;
} }
default: { default: {
cout << "Error: DispatchFinishedDBAsync(): Unknown workpt.b4" << endl; std::cout << "Error: DispatchFinishedDBAsync(): Unknown workpt.b4" << std::endl;
break; break;
} }
} }
@ -119,7 +119,7 @@ bool DBAsyncCB_CharacterBackup(DBAsyncWork* iWork) { // return true means delete
} }
} }
else { 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); safe_delete_array(query);
return true; return true;
} }