C++ Item::ClearEnchantment方法代码示例(c++item::clearenchantment方法的典型用法代码示例)

本文整理汇总了C++中Item::ClearEnchantment方法的典型用法代码示例。如果您正苦于以下问题:C++ Item::ClearEnchantment方法的具体用法?C++ Item::ClearEnchantment怎么用?C++ Item::ClearEnchantment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Item的用法示例。


C++ Item::ClearEnchantment方法代码示例(c++item::clearenchantment方法的典型用法代码示例)

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

示例1: HandleCancelTempItemEnchantmentOpcode

void WorldSession::HandleCancelTempItemEnchantmentOpcode(WorldPacket& recv_data)
{
    sLog.outDebug("WORLD: CMSG_CANCEL_TEMP_ENCHANTMENT");

    CHECK_PACKET_SIZE(recv_data,4);

    uint32 eslot;

    recv_data >> eslot;

    // apply only to equipped item
    if(!Player::IsEquipmentPos(INVENTORY_SLOT_BAG_0,eslot))
        return;

    Item* item = GetPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, eslot);

    if(!item)
        return;

    if(!item->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT))
        return;

    GetPlayer()->ApplyEnchantment(item,TEMP_ENCHANTMENT_SLOT,false);
    item->ClearEnchantment(TEMP_ENCHANTMENT_SLOT);
}
开发者ID:Gweana,项目名称:mangos,代码行数:25,代码来源:ItemHandler.cpp

示例2: HandleCancelTempEnchantmentOpcode

void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPackets::Item::CancelTempEnchantment& cancelTempEnchantment)
{
    // apply only to equipped item
    if (!Player::IsEquipmentPos(INVENTORY_SLOT_BAG_0, cancelTempEnchantment.Slot))
        return;

    Item* item = GetPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, cancelTempEnchantment.Slot);

    if (!item)
        return;

    if (!item->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT))
        return;

    GetPlayer()->ApplyEnchantment(item, TEMP_ENCHANTMENT_SLOT, false);
    item->ClearEnchantment(TEMP_ENCHANTMENT_SLOT);
}
开发者ID:Jildor,项目名称:TrinityCore,代码行数:17,代码来源:ItemHandler.cpp

示例3: HandleCancelTempEnchantmentOpcode

void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPacket& recvData)
{
    TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CANCEL_TEMP_ENCHANTMENT");

    uint32 eslot;

    recvData >> eslot;

    // apply only to equipped item
    if (!Player::IsEquipmentPos(INVENTORY_SLOT_BAG_0, eslot))
        return;

    Item* item = GetPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, eslot);

    if (!item)
        return;

    if (!item->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT))
        return;

    GetPlayer()->ApplyEnchantment(item, TEMP_ENCHANTMENT_SLOT, false);
    item->ClearEnchantment(TEMP_ENCHANTMENT_SLOT);
}
开发者ID:ARAGORN2013,项目名称:TrinityCore,代码行数:23,代码来源:ItemHandler.cpp

本文标签属性:

示例:示例志愿表

代码:代码编程

Item:item什么意思

ClearEnchantment:ClearEnchantment

上一篇:Java Pair.makePair方法代码示例(javapair.makepair方法代码示例汇总)
下一篇:Java DeviceInterfaceModule类代码示例

为您推荐