当前位置: 首页>>代码示例>>C++>>正文


C++ ShowDebug函数代码示例

本文整理汇总了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--;}
		}
	}
}
开发者ID:DeusDisciple,项目名称:darkstar,代码行数:9,代码来源:instance.cpp

示例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;
}
开发者ID:AxlSckay,项目名称:Ragnarok-OldTimes,代码行数:10,代码来源:int_storage.c

示例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;
}
开发者ID:DarkstarProject,项目名称:darkstar,代码行数:9,代码来源:guildutils.cpp

示例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;
}
开发者ID:AxlSckay,项目名称:Ragnarok-OldTimes,代码行数:11,代码来源:inter.c

示例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");
}
开发者ID:HaikuArchives,项目名称:BeBuilder,代码行数:19,代码来源:ViewCodeGenerator.cpp

示例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;
}
开发者ID:kidaa,项目名称:FFXIOrgins,代码行数:20,代码来源:battlefield.cpp

示例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;
}
开发者ID:AlmasB,项目名称:rathena,代码行数:17,代码来源:msg_conf.cpp

示例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;
	}
开发者ID:Euda,项目名称:darkstar,代码行数:43,代码来源:instanceutils.cpp

示例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;
}
开发者ID:Yushiko,项目名称:element-ro,代码行数:12,代码来源:int_storage.c

示例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;
	
}
开发者ID:Cavalero,项目名称:HPM-Plugins,代码行数:10,代码来源:afk.c

示例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);
}
开发者ID:timofonic,项目名称:dopus5allamigas,代码行数:10,代码来源:diag.c

示例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;
}
开发者ID:Zellukas,项目名称:Radices,代码行数:10,代码来源:mapindex.c

示例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;
    }
开发者ID:Alice5150,项目名称:darkstar,代码行数:43,代码来源:battlefieldutils.cpp

示例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;
}
开发者ID:AxlSckay,项目名称:Ragnarok-OldTimes,代码行数:19,代码来源:int_homun.c

示例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
}
开发者ID:mleo1,项目名称:Ragnarok-OldTimes,代码行数:55,代码来源:log.c


注:本文中的ShowDebug函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。