本文整理汇总了C++中ShowDebug函数的典型用法代码示例。如果您正苦于以下问题:C++ ShowDebug函数的具体用法?C++ ShowDebug怎么用?C++ ShowDebug使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ShowDebug函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ShowDebug
void CInstance::lockBcnm(){
for(int i=0; i<m_PlayerList.size(); i++){
if(!m_PlayerList.at(i)->m_insideBCNM){
ShowDebug("Removing %s from the valid players list for BCNMID %i Instance %i \n",m_PlayerList.at(i)->GetName(),
this->m_BcnmID,this->m_InstanceNumber);
if(this->delPlayerFromBcnm(m_PlayerList.at(i))){i--;}
}
}
}
示例2: inter_storage_delete
// q?f[^?
int inter_storage_delete(int account_id)
{
sprintf(tmp_sql, "DELETE FROM `%s` WHERE `account_id`='%d'",storage_db, account_id);
if(mysql_query(&mysql_handle, tmp_sql) ) {
ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
}
return 0;
}
示例3: GetGuild
CGuild* GetGuild(uint8 GuildID)
{
if (GuildID < g_PGuildList.size())
{
return g_PGuildList.at(GuildID);
}
ShowDebug(CL_CYAN"Guild with id <%u> is not found on server\n" CL_RESET, GuildID);
return nullptr;
}
示例4: mapif_parse_WisToGM
// Received wisp message from map-server for ALL gm (just copy the message and resends it to ALL map-servers)
int mapif_parse_WisToGM(int fd) {
unsigned char buf[2048]; // 0x3003/0x3803 <packet_len>.w <wispname>.24B <min_gm_level>.w <message>.?B
ShowDebug("Sent packet back!\n");
memcpy(WBUFP(buf,0), RFIFOP(fd,0), RFIFOW(fd,2));
WBUFW(buf, 0) = 0x3803;
mapif_sendall(buf, RFIFOW(fd,2));
return 0;
}
示例5: ShowDebug
void TViewCodeGenerator::GenerateAll(const char *APath,const char *ClassName)
{
TCodeGenerator::GenerateAll(APath,ClassName);
ShowDebug(string("GenerateAll ClassName=") + ClassName);
PrepareCode(APath,ClassName,true);
/*
// ------- COMPONENT LIST! --------------
TComponent *AComponent = FViewComponent->FChildren->NextComponent(true);
ShowDebug("TViewCodeGenerator::GenerateAll After NextComponent");
while(AComponent!=NULL)
{
ShowDebug("TViewCodeGenerator::GenerateAll Before Generate");
AComponent->Generate(APath);
ShowDebug("TViewCodeGenerator::GenerateAll After Generate");
AComponent = FViewComponent->FChildren->NextComponent(false);
}
*/
ShowDebug("TViewCodeGenerator::GenerateAll Exit from While");
}
示例6: ShowDebug
//Add player to dynamis
bool CBattlefield::addPlayerToDynamis(CCharEntity* PChar) {
//split to get the reason for debugging
if(m_PlayerList.size() >= m_MaxParticipants) {
ShowDebug("Cannot add %s to Dynamis list, max size reached.\n",PChar->GetName());
return false;
}
if(PChar->StatusEffectContainer->HasStatusEffect(EFFECT_DYNAMIS, 0) || PChar->StatusEffectContainer->HasStatusEffect(EFFECT_BATTLEFIELD)) {
ShowDebug("Cannot add %s to Dynamis list, they have BC effect.\n",PChar->GetName());
return false;
}
if(PChar->getZone() != m_ZoneID) {
ShowDebug("Cannot add %s to Dynamis list, not in right zone.\n",PChar->GetName());
return false;
}
m_PlayerList.push_back(PChar);
PChar->StatusEffectContainer->AddStatusEffect(new CStatusEffect(EFFECT_DYNAMIS,0,this->m_BcnmID,0,0),true);
return true;
}
示例7: msg_checklangtype
/*
* verify that the choosen langtype is enable
* return
* 1 : langage enable
* -1 : false range
* -2 : disable
*/
int msg_checklangtype(int lang, bool display){
uint16 test= (1<<(lang-1));
if(!lang) return 1; //default english
else if(lang < 0 || test > LANG_MAX) return -1; //false range
else if (LANG_ENABLE&test) return 1;
else if(display) {
ShowDebug("Unsupported langtype '%d'.\n",lang);
}
return -2;
}
示例8: spawnSecondPartDynamis
bool spawnSecondPartDynamis(CInstance* instance){
DSP_DEBUG_BREAK_IF(instance==NULL);
//get ids from DB
const int8* fmtQuery = "SELECT monsterId \
FROM bcnm_instance \
WHERE bcnmId = %u AND instanceNumber = 2";
int32 ret = Sql_Query(SqlHandle, fmtQuery, instance->getID());
if (ret == SQL_ERROR ||
Sql_NumRows(SqlHandle) == 0)
{
ShowError("spawnSecondPartDynamis : SQL error - Cannot find any monster IDs for Dynamis %i \n",
instance->getID(), instance->getInstanceNumber());
}
else{
while(Sql_NextRow(SqlHandle) == SQL_SUCCESS){
uint32 mobid = Sql_GetUIntData(SqlHandle,0);
CMobEntity* PMob = (CMobEntity*)zoneutils::GetEntity(mobid, TYPE_MOB);
if (PMob != NULL)
{
if (PMob->PBattleAI->GetCurrentAction() == ACTION_NONE ||
PMob->PBattleAI->GetCurrentAction() == ACTION_SPAWN)
{
PMob->PBattleAI->SetLastActionTime(0);
PMob->PBattleAI->SetCurrentAction(ACTION_SPAWN);
PMob->m_instanceID = instance->getInstanceNumber();
ShowDebug("Spawned %s (%u) id %i inst %i \n",PMob->GetName(),PMob->id,instance->getID(),instance->getInstanceNumber());
instance->addEnemy(PMob, CONDITION_SPAWNED_AT_START & CONDITION_WIN_REQUIREMENT);
} else {
ShowDebug(CL_CYAN"spawnSecondPartDynamis: <%s> (%u) is alredy spawned\n" CL_RESET, PMob->GetName(), PMob->id);
}
} else {
ShowDebug("spawnSecondPartDynamis: mob %u not found\n", mobid);
}
}
return true;
}
return false;
}
示例9: inter_storage_sql_init
//---------------------------------------------------------
// storage data initialize
int inter_storage_sql_init(void)
{
//memory alloc
ShowDebug("interserver storage memory initialize....(%d byte)\n",sizeof(struct storage));
storage_pt = (struct storage*)aCalloc(sizeof(struct storage), 1);
guild_storage_pt = (struct guild_storage*)aCalloc(sizeof(struct guild_storage), 1);
return 1;
}
示例10: afk_timeout_adjust
void afk_timeout_adjust(const char *val) { //In Seconds
int value = config_switch(val);
if (value < 0){
ShowDebug("Received Invalid Setting for afk_timeout(%d), defaulting to 0\n",value);
return;
}
afk_timeout = value;
return;
}
示例11: main
void main(int argc,char **argv)
{
if (DOpusBase=OpenLibrary("dopus5.library",0))
{
if (argv[1] && *argv[1])
ShowDebug(argv[1]);
CloseLibrary(DOpusBase);
}
exit(0);
}
示例12: ShowDebug
const char *mapindex_id2name (unsigned short id)
{
if (id > MAX_MAPINDEX || !mapindex_exists (id))
{
ShowDebug ("mapindex_id2name: Requested name for non-existant map index [%d] in cache.\n", id);
return indexes[0].name; // dummy empty string so that the callee doesn't crash
}
return indexes[id].name;
}
示例13: spawnSecondPartDynamis
bool spawnSecondPartDynamis(CBattlefield* battlefield) {
DSP_DEBUG_BREAK_IF(battlefield == nullptr);
//get ids from DB
const int8* fmtQuery = "SELECT monsterId \
FROM bcnm_battlefield \
WHERE bcnmId = %u AND battlefieldNumber = 2";
int32 ret = Sql_Query(SqlHandle, fmtQuery, battlefield->getID());
if (ret == SQL_ERROR ||
Sql_NumRows(SqlHandle) == 0)
{
ShowError("spawnSecondPartDynamis : SQL error - Cannot find any monster IDs for Dynamis %i \n",
battlefield->getID(), battlefield->getBattlefieldNumber());
}
else {
while (Sql_NextRow(SqlHandle) == SQL_SUCCESS) {
uint32 mobid = Sql_GetUIntData(SqlHandle, 0);
CMobEntity* PMob = (CMobEntity*)zoneutils::GetEntity(mobid, TYPE_MOB);
if (PMob != nullptr)
{
if (!PMob->PAI->IsSpawned())
{
PMob->Spawn();
PMob->m_battlefieldID = battlefield->getBattlefieldNumber();
ShowDebug("Spawned %s (%u) id %i inst %i \n", PMob->GetName(), PMob->id, battlefield->getID(), battlefield->getBattlefieldNumber());
battlefield->addEnemy(PMob, CONDITION_SPAWNED_AT_START & CONDITION_WIN_REQUIREMENT);
}
else {
ShowDebug(CL_CYAN"spawnSecondPartDynamis: <%s> (%u) is already spawned\n" CL_RESET, PMob->GetName(), PMob->id);
}
}
else {
ShowDebug("spawnSecondPartDynamis: mob %u not found\n", mobid);
}
}
return true;
}
return false;
}
示例14: inter_delete_homunculus
int inter_delete_homunculus(int hom_id)
{
sprintf(tmp_sql, "DELETE FROM `homunculus` WHERE `homun_id` = '%u'", hom_id);
if(mysql_query(&mysql_handle, tmp_sql))
{
ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
return 0;
}
sprintf(tmp_sql, "DELETE FROM `skill_homunculus` WHERE `homun_id` = '%u'", hom_id);
if(mysql_query(&mysql_handle, tmp_sql))
{
ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
return 0;
}
return 1;
}
示例15: log_pick_pc
int log_pick_pc(struct map_session_data *sd, const char *type, int nameid, int amount, struct item *itm)
{
FILE *logfp;
char *mapname;
nullpo_retr(0, sd);
//Should we log this item? [Lupus]
if (!should_log_item(log_config.filter,nameid, amount))
return 0; //we skip logging this items set - they doesn't met our logging conditions [Lupus]
mapname = (char*)mapindex_id2name(sd->mapindex);
if(mapname==NULL)
mapname="";
#ifndef TXT_ONLY
if(log_config.sql_logs > 0)
{
if (itm==NULL) {
//We log common item
sprintf(tmp_sql, "INSERT DELAYED INTO `%s` (`time`, `char_id`, `type`, `nameid`, `amount`, `map`) VALUES (NOW(), '%d', '%s', '%d', '%d', '%s')",
log_config.log_pick_db, sd->status.char_id, type, nameid, amount, mapname);
} else {
//We log Extended item
sprintf(tmp_sql, "INSERT DELAYED INTO `%s` (`time`, `char_id`, `type`, `nameid`, `amount`, `refine`, `card0`, `card1`, `card2`, `card3`, `map`) VALUES (NOW(), '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s')",
log_config.log_pick_db, sd->status.char_id, type, itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3], mapname);
}
if(mysql_query(&logmysql_handle, tmp_sql))
{
ShowSQL("DB error - %s\n",mysql_error(&logmysql_handle));
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
return 0;
}
return 1;
}
#endif
if((logfp=fopen(log_config.log_pick,"a+")) == NULL)
return 0;
time(&curtime);
strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
if (itm==NULL) {
//We log common item
fprintf(logfp,"%s - %d\t%s\t%d,%d,%s%s",
timestring, sd->status.char_id, type, nameid, amount, mapname, RETCODE);
} else {
//We log Extended item
fprintf(logfp,"%s - %d\t%s\t%d,%d,%d,%d,%d,%d,%d,%s%s",
timestring, sd->status.char_id, type, itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3], mapname, RETCODE);
}
fclose(logfp);
return 1; //Logged
}