本文整理汇总了C++中Guild::GetCurrentXP方法的典型用法代码示例。如果您正苦于以下问题:C++ Guild::GetCurrentXP方法的具体用法?C++ Guild::GetCurrentXP怎么用?C++ Guild::GetCurrentXP使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Guild
的用法示例。
在下文中一共展示了Guild::GetCurrentXP方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HandleGuildLInfoCommand
// Guild-Level-System
static bool HandleGuildLInfoCommand(ChatHandler* handler, char const* /*args*/)
{
Guild* guild = handler->GetSession()->GetPlayer()->GetGuild();
if (guild)
{
handler->PSendSysMessage(LANG_GUILD_INFO_LEVEL, guild->GetLevel());
if (guild->GetLevel() >= GUILD_MAX_LEVEL)
handler->PSendSysMessage(LANG_GUILD_INFO_XP_INFO, 0, 0);
else
handler->PSendSysMessage(LANG_GUILD_INFO_XP_INFO, guild->GetCurrentXP(), guild->GetXpForNextLevel());
handler->PSendSysMessage("Active Bonus:");
if (guild->GetLevel() > 0)
{
if (guild->HasLevelForBonus(GUILD_BONUS_GOLD_BANK_1))
handler->PSendSysMessage("Gold Bonus [Rank 1]");
if (guild->HasLevelForBonus(GUILD_BONUS_GOLD_BANK_2))
handler->PSendSysMessage("Gold Bonus [Rank 2]");
if (guild->HasLevelForBonus(GUILD_BONUS_XP_1))
handler->PSendSysMessage("Experience Bonus [Rank 1]");
if (guild->HasLevelForBonus(GUILD_BONUS_XP_2))
handler->PSendSysMessage("Experience Bonus [Rank 2]");
if (guild->HasLevelForBonus(GUILD_BONUS_FOR_REPAIR_1))
handler->PSendSysMessage("Cheaper Repair Bonus [Rank 1]");
if (guild->HasLevelForBonus(GUILD_BONUS_FOR_REPAIR_2))
handler->PSendSysMessage("Cheaper Repair Bonus [Rank 2]");
if (guild->HasLevelForBonus(GUILD_BONUS_MOUNT_SPEED_1))
handler->PSendSysMessage("Mount Speed [Rank 1]");
if (guild->HasLevelForBonus(GUILD_BONUS_MOUNT_SPEED_2))
handler->PSendSysMessage("Mount Speed Bonus [Rank 2]");
if (guild->HasLevelForBonus(GUILD_BONUS_HONOR_1))
handler->PSendSysMessage("Bonus Honor [Rank 1]");
if (guild->HasLevelForBonus(GUILD_BONUS_HONOR_2))
handler->PSendSysMessage("Bonus Honor [Rank 2]");
if (guild->HasLevelForBonus(GUILD_BONUS_REPUTATION_1))
handler->PSendSysMessage("Reputation Bonus [Rank 1]");
if (guild->HasLevelForBonus(GUILD_BONUS_REPUTATION_2))
handler->PSendSysMessage("Reputation Bonus [Rank 2]");
if (guild->HasLevelForBonus(GUILD_BONUS_FAST_SPIRIT))
handler->PSendSysMessage("Fast Ghost");
}
else handler->PSendSysMessage("None");
return true;
}
else
{
handler->PSendSysMessage("You are not in a guild");
return false;
}
}
示例2: HandleGuildInfoCommand
//Guild-Level-System
static bool HandleGuildInfoCommand(ChatHandler* handler, char const* /*args*/)
{
Guild* guild = handler->GetSession()->GetPlayer()->GetGuild();
if (guild)
{
handler->PSendSysMessage(LANG_GUILDINFO_LEVEL, guild->GetLevel());
if (guild->GetLevel() >= GUILD_MAX_LEVEL)
handler->PSendSysMessage(LANG_GUILDINFO_XP_INFO, 0, 0);
else
handler->PSendSysMessage(LANG_GUILDINFO_XP_INFO, guild->GetCurrentXP(), guild->GetXpForNextLevel());
handler->PSendSysMessage("Active Bonus:");
if (guild->GetLevel() > 0)
{
if (guild->HasLevelForBonus(GUILD_BONUS_GOLD_1) && !guild->HasLevelForBonus(GUILD_BONUS_GOLD_2))
handler->PSendSysMessage("Gold bonus [Rank 1]");
if (guild->HasLevelForBonus(GUILD_BONUS_XP_1) && !guild->HasLevelForBonus(GUILD_BONUS_XP_2))
handler->PSendSysMessage("Bonus Experience [Rank 1]");
if (guild->HasLevelForBonus(GUILD_BONUS_SCHNELLER_GEIST))
handler->PSendSysMessage("Faster Ghost");
if (guild->HasLevelForBonus(GUILD_BONUS_REPERATUR_1) && !guild->HasLevelForBonus(GUILD_BONUS_REPERATUR_2) && !guild->HasLevelForBonus(GUILD_BONUS_REPERATUR_3))
handler->PSendSysMessage("Cheaper Repairs [Rank 1]");
if (guild->HasLevelForBonus(GUILD_BONUS_GOLD_2))
handler->PSendSysMessage("Gold bonus [Rank 2]");
if (guild->HasLevelForBonus(GUILD_BONUS_REITTEMPO_1) && !guild->HasLevelForBonus(GUILD_BONUS_REITTEMPO_2))
handler->PSendSysMessage("Mount Speed [Rank 1]");
if (guild->HasLevelForBonus(GUILD_BONUS_RUF_1) && !guild->HasLevelForBonus(GUILD_BONUS_RUF_2))
handler->PSendSysMessage("Reputation [Rank 1]");
if (guild->HasLevelForBonus(GUILD_BONUS_XP_2))
handler->PSendSysMessage("Bonus Experience [Rank 2]");
if (guild->HasLevelForBonus(GUILD_BONUS_REPERATUR_2) && !guild->HasLevelForBonus(GUILD_BONUS_REPERATUR_3))
handler->PSendSysMessage("Cheaper Repairs [Rank 2]");
if (guild->HasLevelForBonus(GUILD_BONUS_REPERATUR_3))
handler->PSendSysMessage("Cheaper Repairs [Rank 3]");
if (guild->HasLevelForBonus(GUILD_BONUS_REITTEMPO_2))
handler->PSendSysMessage("Mount Speed [Rank 2]");
if (guild->HasLevelForBonus(GUILD_BONUS_RUF_2))
handler->PSendSysMessage("Reputation [Rank 2]");
if (guild->HasLevelForBonus(GUILD_BONUS_EHRE_1) && !guild->HasLevelForBonus(GUILD_BONUS_EHRE_2))
handler->PSendSysMessage("Bonus Honor [Rank 1]");
if (guild->HasLevelForBonus(GUILD_BONUS_EHRE_2))
handler->PSendSysMessage("Bonus Honor [Rank 2]");
if (guild->HasLevelForBonus(GUILD_BONUS_MAIL_1) && !guild->HasLevelForBonus(GUILD_BONUS_MAIL_2))
handler->PSendSysMessage("Bonus Mail [Rank 1]");
if (guild->HasLevelForBonus(GUILD_BONUS_MAIL_2))
handler->PSendSysMessage("Bonus Mail [Rank 2]");
if (guild->HasLevelForBonus(GUILD_BONUS_DURATION))
handler->PSendSysMessage("Flask duration");
if (guild->HasLevelForBonus(GUILD_BONUS_VAULT))
handler->PSendSysMessage("Mobile Guild Vault");
if (guild->HasLevelForBonus(GUILD_BONUS_MOUNT_GRFLY))
handler->PSendSysMessage("Ground and Fly Mount");
if (guild->HasLevelForBonus(GUILD_BONUS_MOUNT_GROUND_FLY))
handler->PSendSysMessage("Ground/Fly mount");
}
else
handler->PSendSysMessage("None");
return true;
}
else
{
handler->PSendSysMessage("You are not in a guild");
return false;
}
}