• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GreenSystemMessage函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GreenSystemMessage函数的典型用法代码示例。如果您正苦于以下问题:C++ GreenSystemMessage函数的具体用法?C++ GreenSystemMessage怎么用?C++ GreenSystemMessage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GreenSystemMessage函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: GreenSystemMessage

bool ChatHandler::HandleInfoCommand(const char* args, WorldSession *m_session)
{
	WorldPacket data;

	
	uint32 clientsNum = (uint32)sWorld.GetSessionCount();

	int gm = 0;
	int count = 0;
	int avg = 0;
	PlayerStorageMap::const_iterator itr;
	objmgr._playerslock.AcquireReadLock();
	for (itr = objmgr._players.begin(); itr != objmgr._players.end(); itr++)
	{
		if(itr->second->GetSession())
		{
			count++;
			avg += itr->second->GetSession()->GetLatency();
			if(itr->second->GetSession()->GetPermissionCount())
				gm++;
		}			
	}
	objmgr._playerslock.ReleaseReadLock();
	GreenSystemMessage(m_session, "Server Uptime: |r%s", sWorld.GetUptimeString().c_str());
	GreenSystemMessage(m_session, "Current Players: |r%d (%d GMs, %d queued)", clientsNum, gm,  0);
	GreenSystemMessage(m_session, "Average Latency: |r%.3fms", (float)((float)avg / (float)count));
	return true;
}
开发者ID:Vanj-crew,项目名称:HearthStone-Emu,代码行数:28,代码来源:Level0.cpp


示例2: RedSystemMessage

bool ChatHandler::HandleReviveStringcommand(const char* args, WorldSession* m_session)
{
	Player* plr = objmgr.GetPlayer(args, false);
	if(!plr)
	{
		RedSystemMessage(m_session, "Could not find player %s.", args);
		return true;
	}

	if(plr->IsDead())
	{
		if(plr->GetInstanceID() == m_session->GetPlayer()->GetInstanceID())
			plr->RemoteRevive();
		else
			sEventMgr.AddEvent(plr, &Player::RemoteRevive, EVENT_PLAYER_REST, 1, 1, EVENT_FLAG_DO_NOT_EXECUTE_IN_WORLD_CONTEXT);

		GreenSystemMessage(m_session, "Revived player %s.", args);
		sGMLog.writefromsession(m_session, "revived player %s", args);
	}
	else
	{
		GreenSystemMessage(m_session, "Player %s is not dead.", args);
	}
	return true;
}
开发者ID:RAlexis,项目名称:ArcEmu_MoP,代码行数:25,代码来源:Level2.cpp


示例3: GreenSystemMessage

bool ChatHandler::HandleGMTicketToggleTicketSystemStatusCommand(const char* args, WorldSession *m_session)
{
	if(sWorld.toggleGMTicketStatus())
		GreenSystemMessage(m_session, "TicketSystem enabled.");
	else
		GreenSystemMessage(m_session, "TicketSystem disabled.");
	return true;
}
开发者ID:miklasiak,项目名称:projekt,代码行数:8,代码来源:GMTicketCommands.cpp


示例4: GreenSystemMessage

//.gm list
bool ChatHandler::HandleGMListCommand(const char* /*args*/, WorldSession* m_session)
{
    bool print_headline = true;

    bool is_gamemaster = m_session->GetPermissionCount() != 0;

    objmgr._playerslock.AcquireReadLock();
    for (PlayerStorageMap::const_iterator itr = objmgr._players.begin(); itr != objmgr._players.end(); ++itr)
    {
        if (itr->second->GetSession()->GetPermissionCount())
        {
            if (!worldConfig.gm.listOnlyActiveGms)
            {
                if (print_headline)
                    GreenSystemMessage(m_session, "The following GMs are on this server:");

                if (worldConfig.gm.hidePermissions && !is_gamemaster)
                    SystemMessage(m_session, " - %s", itr->second->GetName());
                else
                    SystemMessage(m_session, " - %s [%s]", itr->second->GetName(), itr->second->GetSession()->GetPermissions());

                print_headline = false;
            }
            else if (worldConfig.gm.listOnlyActiveGms && itr->second->isGMFlagSet())
            {
                if (itr->second->isGMFlagSet())
                {
                    if (print_headline)
                        GreenSystemMessage(m_session, "The following GMs are active on this server:");

                    if (worldConfig.gm.hidePermissions && !is_gamemaster)
                        SystemMessage(m_session, " - %s", itr->second->GetName());
                    else
                        SystemMessage(m_session, " - %s [%s]", itr->second->GetName(), itr->second->GetSession()->GetPermissions());

                    print_headline = false;
                }
                else
                {
                    SystemMessage(m_session, "No GMs are currently logged in on this server.");
                    print_headline = false;
                }
            }
        }
    }
    objmgr._playerslock.ReleaseReadLock();

    if (print_headline)
    {
        if (!worldConfig.gm.listOnlyActiveGms)
            SystemMessage(m_session, "No GMs are currently logged in on this server.");
        else
            SystemMessage(m_session, "No GMs are currently active on this server.");
    }

    return true;
}
开发者ID:armm77,项目名称:AscEmu,代码行数:58,代码来源:GameMasterCommands.cpp


示例5: GreenSystemMessage

bool ChatHandler::HandleInfoCommand(const char* args, WorldSession *m_session)
{
	WorldPacket data;


	//uint32 clientsNum = (uint32)sWorld.GetSessionCount();

	int gm = 0;
	int count = 0;
	int avg = 0;
	PlayerStorageMap::const_iterator itr;
	objmgr._playerslock.AcquireReadLock();
	for (itr = objmgr._players.begin(); itr != objmgr._players.end(); itr++)
	{
		if(itr->second->GetSession())
		{
			count++;
			avg += itr->second->GetSession()->GetLatency();
			if(itr->second->GetSession()->GetPermissionCount())
				gm++;
		}
	}
	objmgr._playerslock.ReleaseReadLock();
	GreenSystemMessage(m_session, "Server Revision: |r%sArcEmu r%u/%s-%s-%s %s(www.arcemu.org)", MSG_COLOR_WHITE,
		BUILD_REVISION, CONFIG, PLATFORM_TEXT, ARCH, MSG_COLOR_LIGHTBLUE);
	GreenSystemMessage(m_session, "Server Uptime: |r%s", sWorld.GetUptimeString().c_str());
	GreenSystemMessage(m_session, "Current Players: |r%d (%d GMs) (%d Peak)", count, gm,(int)sWorld.PeakSessionCount);
	GreenSystemMessage(m_session, "Active Thread Count: |r%u", ThreadPool.GetActiveThreadCount());
	GreenSystemMessage(m_session, "Free Thread Count: |r%u", ThreadPool.GetFreeThreadCount());
	GreenSystemMessage(m_session, "Average Latency: |r%.3fms", (float)((float)avg / (float)count));
	GreenSystemMessage(m_session, "SQL Query Cache Size (World): |r%u queries delayed", WorldDatabase.GetQueueSize());
	GreenSystemMessage(m_session, "SQL Query Cache Size (Character): |r%u queries delayed", CharacterDatabase.GetQueueSize());
	
	return true;
}
开发者ID:Naqvamp,项目名称:Underworld_Core,代码行数:35,代码来源:Level0.cpp


示例6: GetSelectedPlayer

//.guild removeplayer
bool ChatHandler::HandleGuildRemovePlayerCommand(const char* /*args*/, WorldSession* m_session)
{
    Player* selected_player = GetSelectedPlayer(m_session, true, true);
    if (selected_player == nullptr)
        return true;

#if VERSION_STRING != Cata
    if (selected_player->IsInGuild())
    {
        RedSystemMessage(m_session, "%s not in a guild.", selected_player->GetName());
        return true;
    }
#else
    if (selected_player->GetGuild())
    {
        RedSystemMessage(m_session, "%s not in a guild.", selected_player->GetName());
        return true;
    }
#endif

#if VERSION_STRING != Cata
    if (selected_player->GetGuild()->GetGuildLeader() != selected_player->getGuidLow() || !m_session->GetPlayer()->isGMFlagSet())
    {
        RedSystemMessage(m_session, "Only guild leaders and gms can remove players from a guild!");
        return true;
    }

    GreenSystemMessage(m_session, "Kicked %s from Guild: %s", selected_player->GetName(), selected_player->GetGuild()->getGuildName());

    if (selected_player != m_session->GetPlayer())
        sGMLog.writefromsession(m_session, "Kicked %s from Guild %s", selected_player->GetName(), selected_player->GetGuild()->getGuildName());

    selected_player->GetGuild()->RemoveGuildMember(selected_player->getPlayerInfo(), selected_player->GetSession());
#else
    if (selected_player->GetGuild()->getLeaderGUID() != selected_player->getGuid() || !m_session->GetPlayer()->isGMFlagSet())
    {
        RedSystemMessage(m_session, "Only guild leaders and gms can remove players from a guild!");
        return true;
    }

    GreenSystemMessage(m_session, "Kicked %s from Guild: %s", selected_player->GetName(), selected_player->GetGuild()->getName().c_str());

    if (selected_player != m_session->GetPlayer())
        sGMLog.writefromsession(m_session, "Kicked %s from Guild %s", selected_player->GetName(), selected_player->GetGuild()->getName().c_str());

    selected_player->GetGuild()->handleRemoveMember(selected_player->GetSession(), selected_player->getGuid());
#endif
    return true;
}
开发者ID:armm77,项目名称:AscEmu,代码行数:50,代码来源:GuildCommands.cpp


示例7: GetSelectedPlayer

//.pet removespell
bool ChatHandler::HandlePetRemoveSpellCommand(const char* args, WorldSession* m_session)
{
    Player* selected_player = GetSelectedPlayer(m_session, true, true);
    if (selected_player == nullptr)
        return true;

    if (selected_player->GetSummon() == nullptr)
    {
        RedSystemMessage(m_session, "%s has no pet.", selected_player->GetName());
        return true;
    }

    if (!*args)
        return false;

    uint32 SpellId = atol(args);
    SpellInfo* spell_entry = sSpellCustomizations.GetSpellInfo(SpellId);
    if (spell_entry == nullptr)
    {
        RedSystemMessage(m_session, "Invalid spell id requested.");
        return true;
    }

    std::list<Pet*> summons = selected_player->GetSummons();
    for (std::list<Pet*>::iterator itr = summons.begin(); itr != summons.end(); ++itr)
    {
        (*itr)->RemoveSpell(SpellId);
    }

    GreenSystemMessage(m_session, "Removed spell %u from %s's pet.", SpellId, selected_player->GetName());

    return true;
}
开发者ID:master312,项目名称:AscEmu,代码行数:34,代码来源:PetCommands.cpp


示例8: GreenSystemMessage

bool ChatHandler::HandleGMListCommand(const char* args, WorldSession *m_session)
{
	WorldPacket data;
	bool first = true;

	WorldSession *gm_session;
	SessionSet::iterator itr;

	sWorld.gmList_lock.AcquireReadLock();	
	for (itr = sWorld.gmList.begin(); itr != sWorld.gmList.end();)
	{
		gm_session = (*itr);
		++itr;
		if(first)
			GreenSystemMessage(m_session, "There are following active GMs on this server:");
		first = false;

		if(gm_session->GetPlayer() && m_session != gm_session)
			SystemMessage(m_session, "%s [%s]", gm_session->GetPlayer()->GetName(), gm_session->GetPermissions());
	}
	sWorld.gmList_lock.ReleaseReadLock();
	if(first)
		SystemMessage(m_session, "There are no GMs currently logged in on this server.");

	return true;
}
开发者ID:Ballwinkle,项目名称:Ascent_NG,代码行数:26,代码来源:Level0.cpp


示例9: RedSystemMessage

bool ChatHandler::HandleTicketDeleteCommand(const char* args, WorldSession* m_session)
{
    if (!args)
    {
        RedSystemMessage(m_session, "You need to specify a ticket ID");
        return false;
    }

    Player* player = m_session->GetPlayer();

    uint32 ticketID = atol(args);

    QueryResult* result = CharacterDatabase.Query("SELECT * FROM gm_tickets WHERE ticketid = %u AND deleted = 1", ticketID);

    if (!result)
    {
        RedSystemMessage(m_session, "Ticket %u is not available in gm_tickets table or not closed!", ticketID);
        return false;
    }

    delete result;

    CharacterDatabase.Execute("DELETE FROM gm_tickets WHERE ticketid = %u", ticketID);
    GreenSystemMessage(m_session, "Ticket %u is deleted", ticketID);
    sGMLog.writefromsession(m_session, "deleted ticket %u ", ticketID);

    return true;
}
开发者ID:master312,项目名称:AscEmu,代码行数:28,代码来源:TicketCommands.cpp


示例10: snprintf

bool ChatHandler::HandleInvisibleCommand(const char *args, WorldSession *m_session)
{
	char msg[256];
	Player* pChar =m_session->GetPlayer();

	snprintf(msg, 256, "Invisibility and Invincibility are now ");
	if(pChar->m_isGmInvisible)
	{
		pChar->m_isGmInvisible = false;
		pChar->m_invisible = false;
		pChar->bInvincible = false;
		pChar->Social_TellFriendsOnline();
		if( pChar->m_bg )
		{
			pChar->m_bg->RemoveInvisGM();
		}
		snprintf(msg, 256, "%s OFF.", msg);
	} else {
		pChar->m_isGmInvisible = true;
		pChar->m_invisible = true;
		pChar->bInvincible = true;
		pChar->Social_TellFriendsOffline();
		if( pChar->m_bg )
		{
			pChar->m_bg->AddInvisGM();
		}
		snprintf(msg, 256, "%s ON.", msg);
	}

	snprintf(msg, 256, "%s You may have to leave and re-enter this zone for changes to take effect.", msg);

	GreenSystemMessage(m_session, (const char*)msg);
	return true;
}
开发者ID:Chero,项目名称:abcwow,代码行数:34,代码来源:Level2.cpp


示例11: strchr

bool ChatHandler::HandleAccountMuteCommand(const char* args, WorldSession* m_session)
{
    if (!*args)
        return false;

    char* pAccount = (char*)args;
    char* pDuration = strchr(pAccount, ' ');
    if (pDuration == NULL)
        return false;
    *pDuration = 0;
    ++pDuration;

    uint32_t timeperiod = Util::GetTimePeriodFromString(pDuration);
    if (timeperiod == 0)
        return false;

    uint32 banned = (uint32)UNIXTIME + timeperiod;

    sLogonCommHandler.setAccountMute(pAccount, banned);

    std::string tsstr = Util::GetDateTimeStringFromTimeStamp(timeperiod + (uint32)UNIXTIME);
    GreenSystemMessage(m_session, "Account '%s' has been muted until %s. The change will be effective immediately.", pAccount,
                       tsstr.c_str());

    sGMLog.writefromsession(m_session, "mutex account %s until %s", pAccount, Util::GetDateTimeStringFromTimeStamp(timeperiod + (uint32)UNIXTIME).c_str());

    WorldSession* pSession = sWorld.getSessionByAccountName(pAccount);
    if (pSession != NULL)
    {
        pSession->m_muted = banned;
        pSession->SystemMessage("Your voice has been muted until %s by a GM. Until this time, you will not be able to speak in any form.", tsstr.c_str());
    }

    return true;
}
开发者ID:armm77,项目名称:AscEmu,代码行数:35,代码来源:AccountCommands.cpp


示例12: GreenSystemMessage

bool ChatHandler::HandleGMListCommand(const char* args, WorldSession *m_session)
{
	WorldPacket data;
	bool first = true;

	PlayerStorageMap::const_iterator itr;
	objmgr._playerslock.AcquireReadLock();
	for (itr = objmgr._players.begin(); itr != objmgr._players.end(); itr++)
	{
		if(itr->second->GetSession()->GetPermissionCount())
		{
			if(first)
				GreenSystemMessage(m_session, "There are following active GMs on this server:");

			SystemMessage(m_session, "%s [%s]", itr->second->GetName(), itr->second->GetSession()->GetPermissions());

			first = false;
		}
	}
	objmgr._playerslock.ReleaseReadLock();

	if(first)
		SystemMessage(m_session, "There are no GMs currently logged in on this server.");

	return true;
}
开发者ID:AwkwardDev,项目名称:ascent_classic,代码行数:26,代码来源:Level0.cpp


示例13: getSelectedChar

bool ChatHandler::HandleUnlearnCommand(const char* args, WorldSession * m_session)
{
    Player * plr = getSelectedChar(m_session, true);
    if (plr == 0)
        return true;

    uint32 SpellId = atol(args);
    if (SpellId == 0)
    {
        RedSystemMessage(m_session, "You must specify a spell id.");
        return true;
    }

    sGMLog.writefromsession(m_session, "removed spell %u from %s", SpellId, plr->GetName());

    if (plr->HasSpell(SpellId))
    {
        GreenSystemMessageToPlr(plr, "Removed spell %u.", SpellId);
        GreenSystemMessage(m_session, "Removed spell %u from %s.", SpellId, plr->GetName());
        plr->removeSpell(SpellId, false, false, 0);
    }
    else
    {
        RedSystemMessage(m_session, "That player does not have spell %u learnt.", SpellId);
    }

    return true;
}
开发者ID:Nupper,项目名称:AscEmu_Vanilla,代码行数:28,代码来源:Level1.cpp


示例14: ParseAccBanArgs

bool ChatHandler::HandleAccountBannedCommand(const char* args, WorldSession* m_session)
{
    if (!*args)
        return false;
    char* pAccount = (char*)args;
    char* pReason;
    char* pDuration;
    ParseAccBanArgs(pAccount, &pDuration, &pReason);
    uint32_t timeperiod = 0;
    if (pDuration != NULL)
    {
        timeperiod = Util::GetTimePeriodFromString(pDuration);
        if (timeperiod == 0)
            return false;
    }
    uint32 banned = (timeperiod ? (uint32)UNIXTIME + timeperiod : 1);

    char emptystring = 0;
    if (pReason == NULL)
        pReason = &emptystring;

    sLogonCommHandler.setAccountBanned(pAccount, banned, pReason);

    GreenSystemMessage(m_session, "Account '%s' has been banned %s%s for reason : %s. The change will be effective immediately.", pAccount,
                       timeperiod ? "until " : "forever", timeperiod ? Util::GetDateTimeStringFromTimeStamp(timeperiod + (uint32)UNIXTIME).c_str() : "", pReason);

    sWorld.disconnectSessionByAccountName(pAccount, m_session);
    sGMLog.writefromsession(m_session, "banned account %s until %s", pAccount, timeperiod ? Util::GetDateTimeStringFromTimeStamp(timeperiod + (uint32)UNIXTIME).c_str() : "permanent");
    return true;
}
开发者ID:armm77,项目名称:AscEmu,代码行数:30,代码来源:AccountCommands.cpp


示例15: GreenSystemMessage

Player * ChatHandler::getSelectedChar(WorldSession *m_session, bool showerror)
{
	uint64 guid;
	Player *chr;
	
	guid = m_session->GetPlayer()->GetSelection();
	
	if (guid == 0)
	{
		if(showerror) 
			GreenSystemMessage(m_session, "Auto-targeting self.");
		chr = m_session->GetPlayer(); // autoselect
	}
	else
		chr = m_session->GetPlayer()->GetMapMgr()->GetPlayer(guid);
	
	if(chr == NULL)
	{
		if(showerror) 
			RedSystemMessage(m_session, "This command requires that you select a player.");
		return NULL;
	}

	return chr;
}
开发者ID:Sylica2013,项目名称:Antrix,代码行数:25,代码来源:Chat.cpp


示例16: GreenSystemMessage

bool ChatHandler::HandleRecallDelCommand(const char* args, WorldSession *m_session)
{
	   if(!*args)
		return false;

	QueryResult *result = WorldDatabase.Query( "SELECT id,name FROM recall" );
	if(!result)
		return false;

	do
	{
		Field *fields = result->Fetch();
		float id = fields[0].GetFloat();
		const char * locname = fields[1].GetString();

		if (strnicmp((char*)args,locname,strlen(locname))==0)
		{
			std::stringstream ss;
			ss << "DELETE FROM recall WHERE id = "<< (int)id <<";";
			WorldDatabase.Execute( ss.str( ).c_str( ) );
			GreenSystemMessage(m_session, "Recall location removed.");
			sGMLog.writefromsession(m_session, "used recall delete, removed \"%s\" location from database.", args);
			delete result;
			return true;
		}

	}while (result->NextRow());

	delete result;
	return false;
}
开发者ID:arcticdev,项目名称:arctic-test,代码行数:31,代码来源:RecallCommands.cpp


示例17: GreenSystemMessage

bool ChatHandler::HandleInfoCommand(const char* /*args*/, WorldSession* m_session)
{
    //uint32 clientsNum = (uint32)sWorld.GetSessionCount();

    uint16 gm = 0;
    uint16 count = 0;
    uint32 avg = 0;
    objmgr._playerslock.AcquireReadLock();
    for (PlayerStorageMap::const_iterator itr = objmgr._players.begin(); itr != objmgr._players.end(); ++itr)
    {
        if (itr->second->GetSession())
        {
            count++;
            avg += itr->second->GetSession()->GetLatency();
            if (itr->second->GetSession()->GetPermissionCount())
                gm++;
        }
    }
    objmgr._playerslock.ReleaseReadLock();
//    GreenSystemMessage(m_session, "Server Revision: |r%EasyWOW %s/%s-%s-%s %s(github.com/EasyWoW/)", MSG_COLOR_WHITE,
//        BUILD_HASH_STR, CONFIG, PLATFORM_TEXT, ARCH, MSG_COLOR_LIGHTBLUE);
    GreenSystemMessage(m_session, "Server Uptime: |r%s", sWorld.GetUptimeString().c_str());
    GreenSystemMessage(m_session, "Current Players: |r%d (%d GMs) (%u Peak)", count, gm, sWorld.PeakSessionCount);
    GreenSystemMessage(m_session, "Active Thread Count: |r%u", ThreadPool.GetActiveThreadCount());
    GreenSystemMessage(m_session, "Free Thread Count: |r%u", ThreadPool.GetFreeThreadCount());
    GreenSystemMessage(m_session, "Average Latency: |r%.3fms", ((float)avg / (float)count));
    GreenSystemMessage(m_session, "SQL Query Cache Size (World): |r%u queries delayed", WorldDatabase.GetQueueSize());
    GreenSystemMessage(m_session, "SQL Query Cache Size (Character): |r%u queries delayed", CharacterDatabase.GetQueueSize());

    return true;
}
开发者ID:lev1976g,项目名称:easywow,代码行数:31,代码来源:Level0.cpp


示例18: va_start

void ChatHandler::GreenSystemMessageToPlr(Player* plr, const char *message, ...)
{
	if( !message || !plr->GetSession() ) return;
	va_list ap;
	va_start(ap, message);
	char msg1[1024];
	vsnprintf(msg1,1024,message,ap);
	GreenSystemMessage(plr->GetSession(), (const char*)msg1);
}
开发者ID:Sylica2013,项目名称:Antrix,代码行数:9,代码来源:Chat.cpp


示例19: atoi

bool ChatHandler::HandleAddItemSetCommand(const char* args, WorldSession* m_session)
{
	uint32 setid = (args ? atoi(args) : 0);
	if(!setid)
	{
		RedSystemMessage(m_session, "You must specify a setid.");
		return false;
	}

	Player* chr = getSelectedChar(m_session);
	if(!chr)
	{
		RedSystemMessage(m_session, "Unable to select character.");
		return false;
	}

	ItemSetEntry* entry = dbcItemSet.LookupEntryForced(setid);
	std::list<ItemPrototype*>* l = objmgr.GetListForItemSet(setid);
	if(!entry || !l)
	{
		RedSystemMessage(m_session, "Invalid item set.");
		return false;
	}
	//const char* setname = sItemSetStore.LookupString(entry->name);
	BlueSystemMessage(m_session, "Searching item set %u...", setid);
	uint32 start = getMSTime();
	sGMLog.writefromsession(m_session, "used add item set command, set %u, target %s", setid, chr->GetName());
	for(std::list<ItemPrototype*>::iterator itr = l->begin(); itr != l->end(); ++itr)
	{
		Item* itm = objmgr.CreateItem((*itr)->ItemId, m_session->GetPlayer());
		if(!itm)
			continue;

		if(itm->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
		{
			if(itm->GetProto()->Flags & ITEM_FLAG_ACCOUNTBOUND) // don't "Soulbind" account-bound items
				itm->AccountBind();
			else
				itm->SoulBind();
		}

		if(!chr->GetItemInterface()->AddItemToFreeSlot(itm))
		{
			m_session->SendNotification("No free slots left!");
			itm->DeleteMe();
			return false;
		}
		else
		{
			//SystemMessage(m_session, "Added item: %s [%u]", (*itr)->Name1, (*itr)->ItemId);
			SlotResult* le = chr->GetItemInterface()->LastSearchResult();
			chr->SendItemPushResult(false, true, false, true, le->ContainerSlot, le->Slot, 1 , itm->GetEntry(), itm->GetItemRandomSuffixFactor(), itm->GetItemRandomPropertyId(), itm->GetStackCount());
		}
	}
	GreenSystemMessage(m_session, "Added set to inventory complete. Time: %u ms", getMSTime() - start);
	return true;
}
开发者ID:lev1976g,项目名称:NoxicCore,代码行数:57,代码来源:cmd_item.cpp


示例20: getSelectedChar

bool ChatHandler::HandleSaveCommand(const char* /*args*/, WorldSession* m_session)
{
    Player* p_target = getSelectedChar(m_session, false);
    if (!p_target)
        return false;

    p_target->SaveToDB(false);
    GreenSystemMessage(m_session, "Player %s saved to DB", p_target->GetName());
    return true;
}
开发者ID:lev1976g,项目名称:easywow,代码行数:10,代码来源:Level0.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ Grid函数代码示例发布时间:2022-05-30
下一篇:
C++ Graphics_unsetInner函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap