T端判断装备等级

GetProto()->ItemLevel  
判断装备等级
 
HandleBattleFieldPortOpcode 
进入战场,。
 
 
bool ChatHandler::HandlegetHitemlvlCommand(const char* args)
{
    Player* target;
    uint64 target_guid;
    std::string target_name;
    uint32 itemlevel = 0;
    if (!extractPlayerTarget((char*)args,&target,&target_guid,&target_name))
        return false;
    Player* _player = m_session->GetPlayer();
    if (target)
    {
        for(int slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
        {
            Item *pItem = target->GetItemByPos( INVENTORY_SLOT_BAG_0, slot );
            if(!pItem)
                continue;
            if(itemlevel < pItem->GetProto()->ItemLevel)
                itemlevel = pItem->GetProto()->ItemLevel;
        }
        PSendSysMessage("Most Hight itemlevel = %d ",itemlevel);
        return true;
    }
    
} 

 

posted @ 2014-05-26 15:23  needly  阅读(246)  评论(0编辑  收藏  举报