Compare commits

...

3 Commits

13 changed files with 135 additions and 115 deletions

View File

@ -176,7 +176,7 @@ public:
}
else
{
handler.PSendSysMessage("你必须达到 %u 级 才能创建一个1v1竞技场队伍。", sConfigMgr->GetOption<uint32>("Arena1v1.MinLevel", 70));
handler.PSendSysMessage("你必须达到 {} 级 才能创建一个1v1竞技场队伍。", sConfigMgr->GetOption<uint32>("Arena1v1.MinLevel", 70));
return true;
}
CloseGossipMenuFor(player);

View File

@ -103,12 +103,12 @@ void AntiFarm::Action(Player* player, AntiFarmActions action)
sRew->Rew(player, _rewId);
break;
case AF_CHECK_REPEAT:
ChatHandler(player->GetSession()).SendNotification("%u次人机验证失败,请重新验证!", playerData->AntiFarmCount);
ChatHandler(player->GetSession()).SendNotification(" {} 次人机验证失败,请重新验证!", playerData->AntiFarmCount);
playerData->AntiFarmTimer = 0;
SendCheck(player);
break;
case AF_CHECK_FAIL:
ChatHandler(player->GetSession()).SendNotification("%u次人机验证失败,无法继续游戏!请重新上线!", playerData->AntiFarmCount);
ChatHandler(player->GetSession()).SendNotification(" {} 次人机验证失败,无法继续游戏!请重新上线!", playerData->AntiFarmCount);
Ban(player);
break;
case AF_CHECK_TIME_OUT:

View File

@ -68,7 +68,7 @@ void CharPvpTop::LoadTopSys()
} while (areaidcustom->NextRow());
if (nCount > 0)
LOG_INFO("server.loadding", ">> 读取自定义功能数据表【_活动_比武大会---------】,共%u条数据读取加载用时%u毫秒", nCount, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loadding", ">> 读取自定义功能数据表【_活动_比武大会---------】,共 {} 条数据读取加载,用时 {} 毫秒", nCount, GetMSTimeDiffToNow(oldMSTime));
}
else
return;

View File

@ -473,7 +473,7 @@ public:
uint32 level = atoi(args);
if (player->GetLevel() >= level)
{
ChatHandler(handler->GetSession()).PSendSysMessage("你当前等级%u大于或等于要提升的等级%u", player->GetLevel(), level);
ChatHandler(handler->GetSession()).PSendSysMessage("你当前等级 {} 大于或等于要提升的等级 {}", player->GetLevel(), level);
return true;
}
@ -532,7 +532,7 @@ public:
target->SetObjectScale(Scale);
WorldDatabase.Execute("Update creature_template Set scale = %f WHERE entry = {}", Scale, target->GetEntry());
ChatHandler(handler->GetSession()).PSendSysMessage("[%s][Scale]设置为%f", target->GetName().c_str(), Scale);
ChatHandler(handler->GetSession()).PSendSysMessage("['{}'][Scale]设置为%f", target->GetName().c_str(), Scale);
return true;
}
@ -588,7 +588,7 @@ public:
target->SetDisplayId(displayId);
WorldDatabase.Execute("Update creature_template Set modelid1 = {},modelid2 = 0,modelid3 = 0,modelid4 = 0 WHERE entry ={}", displayId, target->GetEntry());
ChatHandler(handler->GetSession()).PSendSysMessage("[%s][DisplayId]设置为{}", target->GetName().c_str(), displayId);
ChatHandler(handler->GetSession()).PSendSysMessage("['{}'][DisplayId]设置为{}", target->GetName().c_str(), displayId);
return true;
}
@ -687,7 +687,7 @@ public:
return false;
}
ChatHandler(handler->GetSession()).PSendSysMessage("[%s][Name]设置为%s", target->GetName().c_str(), name.c_str());
ChatHandler(handler->GetSession()).PSendSysMessage("['{}'][Name]设置为'{}'", target->GetName().c_str(), name.c_str());
target->SetName(name);
if (CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(target->GetEntry()))
@ -1532,9 +1532,9 @@ public:
sStatPoints->ResetPoints(target);
ChatHandler(target->GetSession()).PSendSysMessage("%s[斗气点]已经重置", sCF->GetNameLink(target).c_str());
ChatHandler(target->GetSession()).PSendSysMessage("'{}'[斗气点]已经重置", sCF->GetNameLink(target).c_str());
if (handler->GetSession()->GetPlayer()->GetGUID() != target->GetGUID())
ChatHandler(handler->GetSession()).PSendSysMessage("%s[斗气点]已经重置", sCF->GetNameLink(target).c_str());
ChatHandler(handler->GetSession()).PSendSysMessage("'{}'[斗气点]已经重置", sCF->GetNameLink(target).c_str());
return true;
}
@ -1987,9 +1987,9 @@ public:
target->SetFreeTalentPoints(target->GetFreeTalentPoints() + uint32(maxExTps - extraTps));
target->SendTalentsInfoData(false);
ChatHandler(target->GetSession()).PSendSysMessage("'{}'获得额外%u个天赋点", sCF->GetNameLink(target).c_str(), uint32(maxExTps - extraTps));
ChatHandler(target->GetSession()).PSendSysMessage("'{}'获得额外 {} 个天赋点", sCF->GetNameLink(target).c_str(), uint32(maxExTps - extraTps));
if (handler->GetSession()->GetPlayer()->GetGUID() != target->GetGUID())
ChatHandler(handler->GetSession()).PSendSysMessage("'{}'获得额外%u个天赋点", sCF->GetNameLink(target).c_str(), uint32(maxExTps - extraTps));
ChatHandler(handler->GetSession()).PSendSysMessage("'{}'获得额外 {} 个天赋点", sCF->GetNameLink(target).c_str(), uint32(maxExTps - extraTps));
if (sSwitch->GetOnOff(ST_TP_ACCOUNT_BIND))
LoginDatabase.Execute(Acore::StringFormat("UPDATE account SET extraTalentPoints = {} WHERE id = {}", maxExTps, target->GetSession()->GetAccountId()));
@ -1998,9 +1998,9 @@ public:
return true;
}
ChatHandler(target->GetSession()).PSendSysMessage("%s获得额外%u个天赋点", sCF->GetNameLink(target).c_str(), tp);
ChatHandler(target->GetSession()).PSendSysMessage("'{}'获得额外 {} 个天赋点", sCF->GetNameLink(target).c_str(), tp);
if (handler->GetSession()->GetPlayer()->GetGUID() != target->GetGUID())
ChatHandler(handler->GetSession()).PSendSysMessage("%s获得额外%u个天赋点", sCF->GetNameLink(target).c_str(), tp);
ChatHandler(handler->GetSession()).PSendSysMessage("'{}'获得额外 {} 个天赋点", sCF->GetNameLink(target).c_str(), tp);
target->SetFreeTalentPoints(target->GetFreeTalentPoints() + tp);
target->SendTalentsInfoData(false);
@ -2060,9 +2060,9 @@ public:
target->SetFreeTalentPoints(target->GetFreeTalentPoints() + uint32(maxExTps - extraTps));
target->SendTalentsInfoData(false);
ChatHandler(target->GetSession()).PSendSysMessage("%s获得额外%u个天赋点", sCF->GetNameLink(target).c_str(), uint32(maxExTps - extraTps));
ChatHandler(target->GetSession()).PSendSysMessage("'{}'获得额外 {} 个天赋点", sCF->GetNameLink(target).c_str(), uint32(maxExTps - extraTps));
if (handler->GetSession()->GetPlayer()->GetGUID() != target->GetGUID())
ChatHandler(handler->GetSession()).PSendSysMessage("%s获得额外%u个天赋点", sCF->GetNameLink(target).c_str(), uint32(maxExTps - extraTps));
ChatHandler(handler->GetSession()).PSendSysMessage("'{}'获得额外 {} 个天赋点", sCF->GetNameLink(target).c_str(), uint32(maxExTps - extraTps));
if (sSwitch->GetOnOff(ST_TP_ACCOUNT_BIND))
LoginDatabase.Execute("UPDATE account SET extraTalentPoints = {} WHERE id = {}", maxExTps, target->GetSession()->GetAccountId());
@ -2071,9 +2071,9 @@ public:
return true;
}
ChatHandler(target->GetSession()).PSendSysMessage("%s获得额外%u个天赋点", sCF->GetNameLink(target).c_str(), tp);
ChatHandler(target->GetSession()).PSendSysMessage("'{}'获得额外 {} 个天赋点", sCF->GetNameLink(target).c_str(), tp);
if (handler->GetSession()->GetPlayer()->GetGUID() != target->GetGUID())
ChatHandler(handler->GetSession()).PSendSysMessage("%s获得额外%u个天赋点", sCF->GetNameLink(target).c_str(), tp);
ChatHandler(handler->GetSession()).PSendSysMessage("'{}'获得额外 {} 个天赋点", sCF->GetNameLink(target).c_str(), tp);
target->SetFreeTalentPoints(target->GetFreeTalentPoints() + tp);
target->SendTalentsInfoData(false);
@ -2132,9 +2132,9 @@ public:
if (playerData->maxPrimaryTradeSkills >= sCF->GetCommercePoints(target))
target->SetFreePrimaryProfessions(playerData->maxPrimaryTradeSkills - sCF->GetCommercePoints(target));
ChatHandler(target->GetSession()).PSendSysMessage("'{}'获得额外%u个商业技能点", sCF->GetNameLink(target).c_str(), uint32(sSwitch->GetValue(ST_EXTRA_CPS_LIMIT) - extraCps));
ChatHandler(target->GetSession()).PSendSysMessage("'{}'获得额外 {} 个商业技能点", sCF->GetNameLink(target).c_str(), uint32(sSwitch->GetValue(ST_EXTRA_CPS_LIMIT) - extraCps));
if (handler->GetSession()->GetPlayer()->GetGUID() != target->GetGUID())
ChatHandler(handler->GetSession()).PSendSysMessage("'{}'获得额外%u个商业技能点", sCF->GetNameLink(target).c_str(), uint32(sSwitch->GetValue(ST_EXTRA_CPS_LIMIT) - extraCps));
ChatHandler(handler->GetSession()).PSendSysMessage("'{}'获得额外 {} 个商业技能点", sCF->GetNameLink(target).c_str(), uint32(sSwitch->GetValue(ST_EXTRA_CPS_LIMIT) - extraCps));
return true;
}
@ -2144,9 +2144,9 @@ public:
target->SetFreePrimaryProfessions(playerData->maxPrimaryTradeSkills - sCF->GetCommercePoints(target));
CharacterDatabase.Execute("update characters set extraPrimaryTradeSkills = extraPrimaryTradeSkills + {} where guid = {}", cp, target->GetGUID().GetCounter());
ChatHandler(target->GetSession()).PSendSysMessage("'{}'获得额外%u个商业技能点", sCF->GetNameLink(target).c_str(), cp);
ChatHandler(target->GetSession()).PSendSysMessage("'{}'获得额外 {} 个商业技能点", sCF->GetNameLink(target).c_str(), cp);
if (handler->GetSession()->GetPlayer()->GetGUID() != target->GetGUID())
ChatHandler(handler->GetSession()).PSendSysMessage("'{}'获得额外%u个商业技能点", sCF->GetNameLink(target).c_str(), cp);
ChatHandler(handler->GetSession()).PSendSysMessage("'{}'获得额外 {} 个商业技能点", sCF->GetNameLink(target).c_str(), cp);
return true;
}
@ -2218,9 +2218,9 @@ public:
LoginDatabase.Execute("UPDATE account SET viplevel = {} WHERE id = {}", vip, target->GetSession()->GetAccountId());
playerData->vipLevel = vip;
ChatHandler(target->GetSession()).PSendSysMessage("%s获得VIP等级%u", sCF->GetNameLink(target).c_str(), vip);
ChatHandler(target->GetSession()).PSendSysMessage("'{}'获得VIP等级 {} ", sCF->GetNameLink(target).c_str(), vip);
if (handler->GetSession()->GetPlayer()->GetGUID() != target->GetGUID())
ChatHandler(handler->GetSession()).PSendSysMessage("%s获得VIP等级%u", sCF->GetNameLink(target).c_str(), vip);
ChatHandler(handler->GetSession()).PSendSysMessage("'{}'获得VIP等级 {} ", sCF->GetNameLink(target).c_str(), vip);
std::string title = "";

View File

@ -1213,7 +1213,7 @@ DWORD WINAPI QQMsgThread(LPVOID i)
char s[1024];
sprintf(s, "GET /openqq/send_group_message?name=%s&content=%s HTTP/1.1\r\nHost: 127.0.0.1:%u\r\n\r\n", QQMSG_GROUP, msg.c_str(), QQMSG_PORT);
sprintf(s, "GET /openqq/send_group_message?name='{}'&content='{}' HTTP/1.1\r\nHost: 127.0.0.1:{}\r\n\r\n", QQMSG_GROUP, msg.c_str(), QQMSG_PORT);
send(cli_sock, s, sizeof(s), 0);
closesocket(cli_sock);
@ -1542,8 +1542,8 @@ bool IsGCValidString(std::string s, std::string description, WorldSession* sessi
//{
// if (session)
// {
// LOG_INFO("server.loadding","IP:%s AccountId:%u CharGUID:%u Opcode:%s SizeType:%u", session->GetRemoteAddress().c_str(), session->GetAccountId(), session->GetGuidLow(), description, size);
// sLog->outChar("IP:%s AccountId:%u CharGUID:%u Opcode:%s SizeType:%u", session->GetRemoteAddress().c_str(), session->GetAccountId(), session->GetGuidLow(), description, size);
// LOG_INFO("server.loadding","IP:'{}' AccountId:{} CharGUID:{} Opcode:'{}' SizeType:{}", session->GetRemoteAddress().c_str(), session->GetAccountId(), session->GetGuidLow(), description, size);
// sLog->outChar("IP:'{}' AccountId:{} CharGUID:{} Opcode:'{}' SizeType:{}", session->GetRemoteAddress().c_str(), session->GetAccountId(), session->GetGuidLow(), description, size);
// }
// recvData.rfinish();
// return false;
@ -1620,8 +1620,8 @@ bool IsGCValidString(std::string s, std::string description, WorldSession* sessi
if (!IsMark && (x < 0xE4B880 || x > 0xE9BEA5))
{
if (session)
//LOG_INFO("server.loadding","Possiable String Hack --> IP:%s AccountId:%u CharGUID:%u Opcode:%s SizeType:%u", session->GetRemoteAddress().c_str(), session->GetAccountId(), session->GetGuidLow(), description.c_str(), size);
LOG_INFO("server.loadding", "Possiable String Hack --> IP:%s AccountId:%u CharGUID:%u Opcode:%s SizeType:%u", session->GetRemoteAddress().c_str(), session->GetAccountId(), session->GetGuidLow(), description.c_str(), size);
//LOG_INFO("server.loadding","Possiable String Hack --> IP:'{}' AccountId:{} CharGUID:{} Opcode:'{}' SizeType:{}", session->GetRemoteAddress().c_str(), session->GetAccountId(), session->GetGuidLow(), description.c_str(), size);
LOG_INFO("server.loadding", "Possiable String Hack --> IP:'{}' AccountId:{} CharGUID:{} Opcode:'{}' SizeType:{}", session->GetRemoteAddress().c_str(), session->GetAccountId(), session->GetGuidLow(), description.c_str(), size);
recvData.rfinish();
return false;
}
@ -1629,7 +1629,7 @@ bool IsGCValidString(std::string s, std::string description, WorldSession* sessi
break;
default:
if (session)
LOG_INFO("server.loadding", "Possiable String Hack --> IP:%s AccountId:%u CharGUID:%u Opcode:%s SizeType:%u", session->GetRemoteAddress().c_str(), session->GetAccountId(), session->GetGuidLow(), description.c_str(), size);
LOG_INFO("server.loadding", "Possiable String Hack --> IP:'{}' AccountId:{} CharGUID:{} Opcode:'{}' SizeType:{}", session->GetRemoteAddress().c_str(), session->GetAccountId(), session->GetGuidLow(), description.c_str(), size);
recvData.rfinish();
return false;
}

View File

@ -555,7 +555,7 @@ uint32 CustomPlayerData::CanStoreDayLimitItem(uint32 entry, uint32 count)
//if (hasCount >= limit)
//{
// ChatHandler(GetSession()).PSendSysMessage("%s达到每日上限 %u", sCF->GetItemLink(entry).c_str(), limit);
// ChatHandler(GetSession()).PSendSysMessage("'{}'达到每日上限 {}", sCF->GetItemLink(entry).c_str(), limit);
// return 0;
//}
@ -611,8 +611,8 @@ void CustomPlayerData::LootCheckPop(uint32 seconds)
//std::ostringstream oss;
//oss << urand(1, 9) << urand(0, 9);
//GetSession()->SendAreaTriggerMessage("|cFFFF0000请输入电子兑换卷号码[|cFF00FFFF%s|cFFFF0000],输入错误或是|cFF66FF33%u|cFFFF0000秒内不输入将被踢出游戏", oss.str().c_str(), seconds);
//ChatHandler(GetSession()).PSendSysMessage("|cFFFF0000请输入电子兑换卷号码[|cFF00FFFF%s|cFFFF0000],输入错误或是|cFF66FF33%u|cFFFF0000秒内不输入将被踢出游戏", oss.str().c_str(), seconds);
//GetSession()->SendAreaTriggerMessage("|cFFFF0000请输入电子兑换卷号码[|cFF00FFFF'{}'|cFFFF0000],输入错误或是|cFF66FF33{}|cFFFF0000秒内不输入将被踢出游戏", oss.str().c_str(), seconds);
//ChatHandler(GetSession()).PSendSysMessage("|cFFFF0000请输入电子兑换卷号码[|cFF00FFFF'{}'|cFFFF0000],输入错误或是|cFF66FF33{}|cFFFF0000秒内不输入将被踢出游戏", oss.str().c_str(), seconds);
//PlayerTalkClass->ClearMenus();
//ADD_GOSSIP_ITEM_EXTENDED(GOSSIP_ICON_BATTLE, "拾取验证", atoi(oss.str().c_str()), GOSSIP_ACTION_INFO_DEF, "", 0, true);
@ -719,7 +719,7 @@ void CustomPlayerData::_ApplyItemModsCustom(Player* player, Item* item, uint8 sl
if (item->IsBroken())
return;
//TC_LOG_DEBUG("entities.player.items", "applying mods for item %u ", item->GetGUID().GetCounter());
//TC_LOG_DEBUG("entities.player.items", "applying mods for item {} ", item->GetGUID().GetCounter());
uint8 attacktype = Player::GetAttackBySlot(slot);
@ -894,81 +894,81 @@ void CustomPlayerData::ApplyEnchantmentCustom(Player* player, Item* item, Enchan
}
}
//TC_LOG_DEBUG("entities.player.items", "Adding %u to stat nb %u", enchant_amount, enchant_spell_id);
//TC_LOG_DEBUG("entities.player.items", "Adding {} to stat nb {}", enchant_amount, enchant_spell_id);
switch (enchant_spell_id)
{
case ITEM_MOD_MANA:
//TC_LOG_DEBUG("entities.player.items", "+ %u MANA", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} MANA", enchant_amount);
player->HandleStatModifier(UNIT_MOD_MANA, BASE_VALUE, float(enchant_amount), apply);
break;
case ITEM_MOD_HEALTH:
//TC_LOG_DEBUG("entities.player.items", "+ %u HEALTH", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} HEALTH", enchant_amount);
player->HandleStatModifier(UNIT_MOD_HEALTH, BASE_VALUE, float(enchant_amount), apply);
break;
case ITEM_MOD_AGILITY:
//TC_LOG_DEBUG("entities.player.items", "+ %u AGILITY", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} AGILITY", enchant_amount);
player->HandleStatModifier(UNIT_MOD_STAT_AGILITY, TOTAL_VALUE, float(enchant_amount), apply);
player->ApplyStatBuffMod(STAT_AGILITY, (float)enchant_amount, apply);
break;
case ITEM_MOD_STRENGTH:
//TC_LOG_DEBUG("entities.player.items", "+ %u STRENGTH", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} STRENGTH", enchant_amount);
player->HandleStatModifier(UNIT_MOD_STAT_STRENGTH, TOTAL_VALUE, float(enchant_amount), apply);
player->ApplyStatBuffMod(STAT_STRENGTH, (float)enchant_amount, apply);
break;
case ITEM_MOD_INTELLECT:
//TC_LOG_DEBUG("entities.player.items", "+ %u INTELLECT", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} INTELLECT", enchant_amount);
player->HandleStatModifier(UNIT_MOD_STAT_INTELLECT, TOTAL_VALUE, float(enchant_amount), apply);
player->ApplyStatBuffMod(STAT_INTELLECT, (float)enchant_amount, apply);
break;
case ITEM_MOD_SPIRIT:
//TC_LOG_DEBUG("entities.player.items", "+ %u SPIRIT", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} SPIRIT", enchant_amount);
player->HandleStatModifier(UNIT_MOD_STAT_SPIRIT, TOTAL_VALUE, float(enchant_amount), apply);
player->ApplyStatBuffMod(STAT_SPIRIT, (float)enchant_amount, apply);
break;
case ITEM_MOD_STAMINA:
//TC_LOG_DEBUG("entities.player.items", "+ %u STAMINA", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} STAMINA", enchant_amount);
player->HandleStatModifier(UNIT_MOD_STAT_STAMINA, TOTAL_VALUE, float(enchant_amount), apply);
player->ApplyStatBuffMod(STAT_STAMINA, (float)enchant_amount, apply);
break;
case ITEM_MOD_DEFENSE_SKILL_RATING:
player->ApplyRatingMod(CR_DEFENSE_SKILL, enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u DEFENCE", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} DEFENCE", enchant_amount);
break;
case ITEM_MOD_DODGE_RATING:
player->ApplyRatingMod(CR_DODGE, enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u DODGE", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} DODGE", enchant_amount);
break;
case ITEM_MOD_PARRY_RATING:
player->ApplyRatingMod(CR_PARRY, enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u PARRY", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} PARRY", enchant_amount);
break;
case ITEM_MOD_BLOCK_RATING:
player->ApplyRatingMod(CR_BLOCK, enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u SHIELD_BLOCK", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} SHIELD_BLOCK", enchant_amount);
break;
case ITEM_MOD_HIT_MELEE_RATING:
player->ApplyRatingMod(CR_HIT_MELEE, enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u MELEE_HIT", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} MELEE_HIT", enchant_amount);
break;
case ITEM_MOD_HIT_RANGED_RATING:
player->ApplyRatingMod(CR_HIT_RANGED, enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u RANGED_HIT", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} RANGED_HIT", enchant_amount);
break;
case ITEM_MOD_HIT_SPELL_RATING:
player->ApplyRatingMod(CR_HIT_SPELL, enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u SPELL_HIT", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} SPELL_HIT", enchant_amount);
break;
case ITEM_MOD_CRIT_MELEE_RATING:
player->ApplyRatingMod(CR_CRIT_MELEE, enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u MELEE_CRIT", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} MELEE_CRIT", enchant_amount);
break;
case ITEM_MOD_CRIT_RANGED_RATING:
player->ApplyRatingMod(CR_CRIT_RANGED, enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u RANGED_CRIT", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} RANGED_CRIT", enchant_amount);
break;
case ITEM_MOD_CRIT_SPELL_RATING:
player->ApplyRatingMod(CR_CRIT_SPELL, enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u SPELL_CRIT", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} SPELL_CRIT", enchant_amount);
break;
// Values from ITEM_STAT_MELEE_HA_RATING to ITEM_MOD_HASTE_RANGED_RATING are never used
// in Enchantments
@ -1003,13 +1003,13 @@ void CustomPlayerData::ApplyEnchantmentCustom(Player* player, Item* item, Enchan
player->ApplyRatingMod(CR_HIT_MELEE, enchant_amount, apply);
player->ApplyRatingMod(CR_HIT_RANGED, enchant_amount, apply);
player->ApplyRatingMod(CR_HIT_SPELL, enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u HIT", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} HIT", enchant_amount);
break;
case ITEM_MOD_CRIT_RATING:
player->ApplyRatingMod(CR_CRIT_MELEE, enchant_amount, apply);
player->ApplyRatingMod(CR_CRIT_RANGED, enchant_amount, apply);
player->ApplyRatingMod(CR_CRIT_SPELL, enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u CRITICAL", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} CRITICAL", enchant_amount);
break;
// Values ITEM_MOD_HIT_TAKEN_RATING and ITEM_MOD_CRIT_TAKEN_RATING are never used in Enchantment
// case ITEM_MOD_HIT_TAKEN_RATING:
@ -1026,54 +1026,54 @@ void CustomPlayerData::ApplyEnchantmentCustom(Player* player, Item* item, Enchan
player->ApplyRatingMod(CR_CRIT_TAKEN_MELEE, enchant_amount, apply);
player->ApplyRatingMod(CR_CRIT_TAKEN_RANGED, enchant_amount, apply);
player->ApplyRatingMod(CR_CRIT_TAKEN_SPELL, enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u RESILIENCE", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} RESILIENCE", enchant_amount);
break;
case ITEM_MOD_HASTE_RATING:
player->ApplyRatingMod(CR_HASTE_MELEE, enchant_amount, apply);
player->ApplyRatingMod(CR_HASTE_RANGED, enchant_amount, apply);
player->ApplyRatingMod(CR_HASTE_SPELL, enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u HASTE", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} HASTE", enchant_amount);
break;
case ITEM_MOD_EXPERTISE_RATING:
player->ApplyRatingMod(CR_EXPERTISE, enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u EXPERTISE", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} EXPERTISE", enchant_amount);
break;
case ITEM_MOD_ATTACK_POWER:
player->HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(enchant_amount), apply);
player->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(enchant_amount), apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u ATTACK_POWER", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} ATTACK_POWER", enchant_amount);
break;
case ITEM_MOD_RANGED_ATTACK_POWER:
player->HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(enchant_amount), apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u RANGED_ATTACK_POWER", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} RANGED_ATTACK_POWER", enchant_amount);
break;
// case ITEM_MOD_FERAL_ATTACK_POWER:
// ApplyFeralAPBonus(enchant_amount, apply);
// //TC_LOG_DEBUG("entities.player.items", "+ %u FERAL_ATTACK_POWER", enchant_amount);
// //TC_LOG_DEBUG("entities.player.items", "+ {} FERAL_ATTACK_POWER", enchant_amount);
// break;
case ITEM_MOD_MANA_REGENERATION:
player->ApplyManaRegenBonus(enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u MANA_REGENERATION", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} MANA_REGENERATION", enchant_amount);
break;
case ITEM_MOD_ARMOR_PENETRATION_RATING:
player->ApplyRatingMod(CR_ARMOR_PENETRATION, enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u ARMOR PENETRATION", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} ARMOR PENETRATION", enchant_amount);
break;
case ITEM_MOD_SPELL_POWER:
player->ApplySpellPowerBonus(enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u SPELL_POWER", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} SPELL_POWER", enchant_amount);
break;
case ITEM_MOD_HEALTH_REGEN:
player->ApplyHealthRegenBonus(enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u HEALTH_REGENERATION", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} HEALTH_REGENERATION", enchant_amount);
break;
case ITEM_MOD_SPELL_PENETRATION:
player->ApplySpellPenetrationBonus(enchant_amount, apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u SPELL_PENETRATION", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} SPELL_PENETRATION", enchant_amount);
break;
case ITEM_MOD_BLOCK_VALUE:
player->HandleBaseModValue(SHIELD_BLOCK_VALUE, FLAT_MOD, float(enchant_amount), apply);
//TC_LOG_DEBUG("entities.player.items", "+ %u BLOCK_VALUE", enchant_amount);
//TC_LOG_DEBUG("entities.player.items", "+ {} BLOCK_VALUE", enchant_amount);
break;
case ITEM_MOD_SPELL_HEALING_DONE: // deprecated
case ITEM_MOD_SPELL_DAMAGE_DONE: // deprecated
@ -1695,7 +1695,7 @@ public:
// 脱离战斗冷却
if (!playerData->canStopCombat)
{
//ChatHandler(player->GetSession()).PSendSysMessage("更新自定义数据:%u", p_time);
//ChatHandler(player->GetSession()).PSendSysMessage("更新自定义数据:{}", p_time);
playerData->stopCombatCD -= p_time;
if (playerData->stopCombatCD < 0)
playerData->canStopCombat = true;

View File

@ -179,7 +179,7 @@ uint32 CustomWorldData::GetGlobalPlayerGUID(std::string name) const
_customtopname = resultcustom->Fetch()[0].Get<std::string>();
LOG_INFO("server info", "Player % s[GUID:% u] was not found in the global storage, but it was found in the database.", name.c_str(), guid);
//sLog->outString("Player %s [GUID: %u] was not found in the global storage, but it was found in the database.", name.c_str(), guidLow);
//sLog->outString("Player '{}' [GUID: {}] was not found in the global storage, but it was found in the database.", name.c_str(), guidLow);
// guid 账户ID 名称 性别 种族 职业 等级 邮件数量 工会ID 天下第一名称
//ObjectGuid guid, uint32 accountId, std::string const& playerName, uint8 gender, uint8 race, uint8 playerClass, uint8 level, uint8 mailCount, uint32 guildId, std::string const& topname)
@ -205,7 +205,7 @@ uint32 CustomWorldData::GetGlobalPlayerGUID(std::string name) const
itr = _globalPlayerNameStore.find(name);
if (itr != _globalPlayerNameStore.end())
{
LOG_INFO("server info", "Player %s [GUID: %u] added to the global storage.", name.c_str(), guid);
LOG_INFO("server info", "Player '{}' [GUID: {}] added to the global storage.", name.c_str(), guid);
return guid;
}

View File

@ -97,7 +97,7 @@ void mod_CustomWorldSession::FixedBGJoin(Player* player, uint32 bgTypeId_)
{
if (player->GetMaxHealth() < limitHP)
{
ChatHandler(player->GetSession()).PSendSysMessage("该战场要求生命值达到 %u", limitHP);
ChatHandler(player->GetSession()).PSendSysMessage("该战场要求生命值达到 {}", limitHP);
return;
}
@ -118,7 +118,7 @@ void mod_CustomWorldSession::FixedBGJoin(Player* player, uint32 bgTypeId_)
{
// 提供更多错误上下文的详细消息
ChatHandler(player->GetSession()).PSendSysMessage(
"无法加入战场队列因为提供的战场类型ID [%u] 无效或不适用。"
"无法加入战场队列因为提供的战场类型ID [{}] 无效或不适用。"
"这可能是因为尝试使用了竞技场类型ID或者提供的战场类型不存在。请检查并重试。",
bgTypeId);
return;
@ -127,7 +127,7 @@ void mod_CustomWorldSession::FixedBGJoin(Player* player, uint32 bgTypeId_)
if (!bgt)
{
// 包含战场类型ID的详细消息
ChatHandler(player->GetSession()).PSendSysMessage("无法获取战场模板战场类型ID [%u] 可能是无效的或未定义。", bgTypeId);
ChatHandler(player->GetSession()).PSendSysMessage("无法获取战场模板战场类型ID [{}] 可能是无效的或未定义。", bgTypeId);
return;
}
@ -135,7 +135,7 @@ void mod_CustomWorldSession::FixedBGJoin(Player* player, uint32 bgTypeId_)
if (player->GetBattlegroundQueueIndex(bgQueueTypeId) < PLAYER_MAX_BATTLEGROUND_QUEUES)
{
ChatHandler(player->GetSession()).PSendSysMessage("你已在 [%s] 战场队列中。", bgName.c_str());
ChatHandler(player->GetSession()).PSendSysMessage("你已在 ['{}'] 战场队列中。", bgName.c_str());
return;
}
@ -165,7 +165,7 @@ void mod_CustomWorldSession::FixedBGJoin(Player* player, uint32 bgTypeId_)
// 包含玩家等级的详细消息
ChatHandler(player->GetSession()).PSendSysMessage
(
"在你的当前等级(%u)下无法找到适合的战场分组。请检查是否达到参加战场的最低等级要求。", player->GetLevel()
"在你的当前等级({})下无法找到适合的战场分组。请检查是否达到参加战场的最低等级要求。", player->GetLevel()
);
return;
}
@ -196,7 +196,7 @@ void mod_CustomWorldSession::FixedBGJoin(Player* player, uint32 bgTypeId_)
sBattlegroundMgr->ScheduleQueueUpdate(0, 0, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId()); //正确加入队列
ChatHandler(player->GetSession()).PSendSysMessage("你已成功加入 [%s] 战场队列。", bgName.c_str());
ChatHandler(player->GetSession()).PSendSysMessage("你已成功加入 ['{}'] 战场队列。", bgName.c_str());
}
@ -475,11 +475,11 @@ void mod_CustomWorldSession::SendTrainerList(ObjectGuid creatureGuid, const std:
if (!player || !player->GetSession())
return;
ChatHandler(player->GetSession()).PSendSysMessage("玩家 %s",player->GetName());
ChatHandler(player->GetSession()).PSendSysMessage("玩家 '{}'",player->GetName());
//ObjectGuid creatureGuid = ObjectGuid::Create<HighGuid::Unit>(entry, guid);
ChatHandler(player->GetSession()).PSendSysMessage("正在尝试与GUID %s 交互", creatureGuid.ToString().c_str());
ChatHandler(player->GetSession()).PSendSysMessage("正在尝试与GUID '{}' 交互", creatureGuid.ToString().c_str());
Creature* unit = player->GetNPCIfCanInteractWith(creatureGuid, UNIT_NPC_FLAG_TRAINER);
if (!unit)
@ -500,7 +500,7 @@ void mod_CustomWorldSession::SendTrainerList(ObjectGuid creatureGuid, const std:
//TrainerSpellData const* trainer_spells = unit->GetTrainerSpells();
if (!trainer_spells)
{
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: SendTrainerList - Training spells not found for creature (GUID: %u Entry: %u)",
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: SendTrainerList - Training spells not found for creature (GUID: {} Entry: {})",
// GUID_LOPART(guid), unit->GetEntry());
return;
}
@ -768,11 +768,11 @@ void mod_CustomWorldSessionB::SendTrainerList(Player* player, ObjectGuid creatur
if (!player || !player->GetSession())
return;
ChatHandler(player->GetSession()).PSendSysMessage("玩家 %s", player->GetName());
ChatHandler(player->GetSession()).PSendSysMessage("玩家 '{}'", player->GetName());
//ObjectGuid creatureGuid = ObjectGuid::Create<HighGuid::Unit>(entry, guid);
ChatHandler(player->GetSession()).PSendSysMessage("正在尝试与GUID %s 交互", creatureGuid.ToString().c_str());
ChatHandler(player->GetSession()).PSendSysMessage("正在尝试与GUID '{}' 交互", creatureGuid.ToString().c_str());
Creature* unit = player->GetNPCIfCanInteractWith(creatureGuid, UNIT_NPC_FLAG_TRAINER);
if (!unit)
@ -793,7 +793,7 @@ void mod_CustomWorldSessionB::SendTrainerList(Player* player, ObjectGuid creatur
//TrainerSpellData const* trainer_spells = unit->GetTrainerSpells();
if (!trainer_spells)
{
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: SendTrainerList - Training spells not found for creature (GUID: %u Entry: %u)",
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: SendTrainerList - Training spells not found for creature (GUID: {} Entry: {})",
// GUID_LOPART(guid), unit->GetEntry());
return;
}

View File

@ -794,7 +794,7 @@ void ArenaDuel::EndGamble(bool redwin)
{
uint32 x = itr->second * total / red;
sCF->UpdateTokenAmount(player, x, true, "竞技场决斗赌博获胜");
player->GetSession()->SendAreaTriggerMessage("压注[红队]成功,获得%u[积分]", x);
player->GetSession()->SendAreaTriggerMessage("压注[红队]成功,获得{}[积分]", x);
}
}
else
@ -808,7 +808,7 @@ void ArenaDuel::EndGamble(bool redwin)
{
uint32 x = abs(itr->second) * total / blue;
sCF->UpdateTokenAmount(player, x, true, "竞技场决斗赌博获胜");
player->GetSession()->SendAreaTriggerMessage("压注[蓝队]成功,获得%u[积分]", x);
player->GetSession()->SendAreaTriggerMessage("压注[蓝队]成功,获得{}[积分]", x);
}
}
else
@ -852,10 +852,10 @@ public:
sCF->UpdateTokenAmount(player, count, false, "竞技场决斗赌博压注");
if (action == 1)
player->GetSession()->SendAreaTriggerMessage("你下注%u[积分][%s]获胜", count, "红队");
player->GetSession()->SendAreaTriggerMessage("你下注{}[积分]['{}']获胜", count, "红队");
else if (action == 2)
{
player->GetSession()->SendAreaTriggerMessage("你下注%u[积分][%s]获胜", count, "蓝队");
player->GetSession()->SendAreaTriggerMessage("你下注{}[积分]['{}']获胜", count, "蓝队");
count = -count;
}

View File

@ -606,12 +606,21 @@ void DoubleArmor::GiveItemBack(Player* player, EquipmentSlots slot) {
Item* item = sItemMod->AddItem(player, armor.itemEntry, 1);
if (item)
{
ChatHandler(player->GetSession()).PSendSysMessage("GiveItemBack: Restoring item %u to player %u", armor.itemEntry, player->GetGUID().GetCounter());
// 获取物品名称
ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(armor.itemEntry);
std::string itemName = itemTemplate ? itemTemplate->Name1 : "未知物品";
ChatHandler(player->GetSession()).PSendSysMessage("正在将物品 [{}] 退还给玩家 {}", itemName, player->GetName());
for (uint8 enchant_slot = 0; enchant_slot < MAX_ENCHANTMENT_SLOT; enchant_slot++) {
uint32 enchantId = armor.enchant[enchant_slot];
if (enchantId > 0) {
item->SetEnchantment(EnchantmentSlot(enchant_slot), enchantId, 0, 0, player->GetGUID());
ChatHandler(player->GetSession()).PSendSysMessage("GiveItemBack: Restoring enchantment %u to slot %u on item %u", enchantId, enchant_slot, armor.itemEntry);
// 获取附魔名称
SpellItemEnchantmentEntry const* enchant = sSpellItemEnchantmentStore.LookupEntry(enchantId);
std::string enchantName = enchant ? enchant->description[player->GetSession()->GetSessionDbLocaleIndex()] : "未知附魔";
ChatHandler(player->GetSession()).PSendSysMessage("正在将附魔 [{}] 恢复到物品 [{}]", enchantName, itemName);
}
}
}

View File

@ -789,6 +789,7 @@ else if (IsOpcode(opcode, "SSC_ITEM_TO_SLOT"))
if (!sReq->Check(player, reqId))
return true;
// 检测玩家背包剩余格子数量
if (player->ToPlayer()->GetFreeInventorySpace() == 0)
{
player->SendEquipError(EQUIP_ERR_INVENTORY_FULL, NULL, NULL, NULL);
@ -801,8 +802,10 @@ else if (IsOpcode(opcode, "SSC_ITEM_TO_SLOT"))
// 单次抽奖奖励
else if (IsOpcode(opcode, "GC_C_LUCKDRAW_REWARDINGLE"))
{
uint32 itemid = atoi(SplitStr(msg, 1).c_str());
s_SM_LuckDraw->RewardSingle(player, itemid);
/* uint32 itemid = atoi(SplitStr(msg, 1).c_str());
s_SM_LuckDraw->RewardSingle(player, itemid);*/
s_SM_LuckDraw->RewardSingle(player);
}
@ -815,10 +818,11 @@ else if (IsOpcode(opcode, "SSC_ITEM_TO_SLOT"))
if (!sReq->Check(player, reqId))
return true;
// 检测玩家背包剩余格子数量
if (player->ToPlayer()->GetFreeInventorySpace() < 11)
{
//player->SendEquipError(EQUIP_ERR_INVENTORY_FULL, NULL, NULL, NULL); //背包已满报错
ChatHandler(player->GetSession()).SendNotification("背包空间不足");
ChatHandler(player->GetSession()).SendNotification("背包空间不足以存放十连抽物品");
return NULL;
}

View File

@ -196,20 +196,23 @@ public:
LoginAnnounce() : PlayerScript("LoginAnnounce") {}
// 首次登录
virtual void OnFirstLogin(Player* player) {
virtual void OnFirstLogin(Player* player) override
{
if (!sSwitch->GetOnOff(ST_LOG_IN))
return;
// 首次登录特定的消息逻辑
std::string text = sString->Format(sString->GetText(STR_LOGIN), sCF->GetPlayerTotalName(player, sSwitch->GetFlag(ST_LOG_IN)).c_str());
// 获取角色的总游戏时间
uint32 totalTime = player->GetTotalPlayedTime();
// 为首次登录添加额外的消息内容
text += "\n" + sString->Format(
player->GetTeamId() == TEAM_ALLIANCE ? sString->GetText(STR_LOGIN_A) : sString->GetText(STR_LOGIN_H),
sCF->GetPlayerTotalName(player, sSwitch->GetFlag(ST_LOG_IN)).c_str());
// 如果总游戏时间为 0表示首次登录
if (totalTime == 0)
{
// 为首次登录添加额外的消息内容
std::string text = "\n" + sString->Format(player->GetTeamId() == TEAM_ALLIANCE ? sString->GetText(STR_LOGIN_A) : sString->GetText(STR_LOGIN_H), sCF->GetPlayerTotalName(player, sSwitch->GetFlag(ST_LOG_IN)).c_str());
//sWorldSessionMgr->SendGlobalText(text.c_str(), NULL);
sWorldSessionMgr->SendServerMessage(SERVER_MSG_STRING, text.c_str());
// 发送消息
sWorldSessionMgr->SendServerMessage(SERVER_MSG_STRING, text.c_str());
}
}
// 通用登录
@ -218,12 +221,16 @@ public:
if (!sSwitch->GetOnOff(ST_LOG_IN))
return;
// 通用登录消息逻辑
std::string text = sString->Format(sString->GetText(STR_LOGIN), sCF->GetPlayerTotalName(player, sSwitch->GetFlag(ST_LOG_IN)).c_str());
//sWorldSessionMgr->SendGlobalText(text.c_str(), NULL);
sWorldSessionMgr->SendServerMessage(SERVER_MSG_STRING, text.c_str());
// 获取角色的总游戏时间
uint32 totalTime = player->GetTotalPlayedTime();
sMotdMgr->SetMotd("123456456", LOCALE_zhCN);
// 如果总游戏时间不为 0表示非首次登录
if (totalTime > 0)
{
// 通用登录消息逻辑
std::string text = sString->Format(sString->GetText(STR_LOGIN), sCF->GetPlayerTotalName(player, sSwitch->GetFlag(ST_LOG_IN)).c_str());
sWorldSessionMgr->SendServerMessage(SERVER_MSG_STRING, text.c_str());
}
}
//退出游戏

View File

@ -203,7 +203,7 @@ void SoulStoneEx::SavePlayerSlotToSTL(Player* player, uint32 page, uint32 slot,
// 如果插槽编号大于6则退出函数。
if (slot > 6) {
LOG_ERROR("custom.modeles", "SavePlayerSlotToSTL失败: 插槽编号 %u 超出范围", slot);
LOG_ERROR("custom.modeles", "SavePlayerSlotToSTL失败: 插槽编号 {} 超出范围", slot);
return;
}
@ -233,7 +233,7 @@ void SoulStoneEx::SavePlayerSlotToSTL(Player* player, uint32 page, uint32 slot,
// SavePlayerAllDate(player);
}
else {
LOG_ERROR("custom.modeles", "SavePlayerSlotToSTL失败: 未找到玩家GUID %u 的匹配条目", guid);
LOG_ERROR("custom.modeles", "SavePlayerSlotToSTL失败: 未找到玩家GUID {} 的匹配条目", guid);
}
}
@ -255,7 +255,7 @@ void SoulStoneEx::SavePlayerSlotToBase(Player* player, uint32 page, uint32 slot,
// 如果插槽编号大于6则退出函数。
if (slot > 6) {
LOG_ERROR("custom.modeles", "SavePlayerSlotToBase失败: 插槽编号 %u 超出范围", slot);
LOG_ERROR("custom.modeles", "SavePlayerSlotToBase失败: 插槽编号 {} 超出范围", slot);
return;
}
@ -355,7 +355,7 @@ void SoulStoneEx::PlayerBuyPage(Player* player, uint32 page)
uint32 maxPage = GetPlayerMaxPage(player);
if (page > maxPage + 1)
{
ChatHandler(player->GetSession()).PSendSysMessage("您必须按顺序购买符文页面。当前您可以购买的最大页面是 %u", maxPage + 1);
ChatHandler(player->GetSession()).PSendSysMessage("您必须按顺序购买符文页面。当前您可以购买的最大页面是 {}", maxPage + 1);
return;
}
@ -388,7 +388,7 @@ void SoulStoneEx::PlayerBuyPage(Player* player, uint32 page)
// 页面购买成功扣除需求 发送消息
auto BuyItr = _SoulStoneExBuyReqMap.find(page);
if (BuyItr == _SoulStoneExBuyReqMap.end()) {
LOG_ERROR("custom.modeles", "IsBuyPageReq失败: 未找到页面 %u 的购买需求", page);
LOG_ERROR("custom.modeles", "IsBuyPageReq失败: 未找到页面 {} 的购买需求", page);
return;
}
uint32 reqId = BuyItr->second.ReqID; // 根据page确定对应的reqId
@ -822,7 +822,7 @@ void SoulStoneEx::UpdatePageActivation(Player* player, uint32 page)
SavePlayerAllDate(player); // 保存玩家数据
}
else {
LOG_ERROR("custom.modeles","UpdatePageActivation失败: 未找到玩家GUID %u 的匹配条目", guid);
LOG_ERROR("custom.modeles","UpdatePageActivation失败: 未找到玩家GUID {} 的匹配条目", guid);
}
}
@ -854,7 +854,7 @@ bool SoulStoneEx::IsBuyPageReq(Player* player, uint32 page) {
auto BuyItr = _SoulStoneExBuyReqMap.find(page);
if (BuyItr == _SoulStoneExBuyReqMap.end()) {
LOG_ERROR("custom.modeles","IsBuyPageReq失败: 未找到页面 %u 的购买需求", page);
LOG_ERROR("custom.modeles","IsBuyPageReq失败: 未找到页面 {} 的购买需求", page);
return false;
}
@ -863,7 +863,7 @@ bool SoulStoneEx::IsBuyPageReq(Player* player, uint32 page) {
//增加需求项
if (!sReq->Check(player, reqId)) {
// 如果不满足需求则发送消息并返回false
ChatHandler(player->GetSession()).PSendSysMessage("您不满足购买第 %u 页的需求", page);
ChatHandler(player->GetSession()).PSendSysMessage("您不满足购买第 {} 页的需求", page);
return false;
}
@ -914,11 +914,11 @@ void SoulStoneEx::SetActiId(Player* player, uint32 page, uint32 itemid)
SavePlayerAllDate(player); // 保存玩家数据
}
else {
LOG_ERROR("custom.modeles","SetActiId失败: 未找到匹配的页面 %u", page);
LOG_ERROR("custom.modeles","SetActiId失败: 未找到匹配的页面 {}", page);
}
}
else {
LOG_ERROR("custom.modeles","SetActiId失败: 未找到玩家GUID %u 的匹配条目", guid);
LOG_ERROR("custom.modeles","SetActiId失败: 未找到玩家GUID {} 的匹配条目", guid);
}
}
@ -935,7 +935,7 @@ void SoulStoneEx::ApplyBuff(Player* player, uint32 itemid)
// 如果物品模板不存在,则退出函数。
if (!pProto) {
LOG_ERROR("custom.modeles","ApplyBuff失败: 无法找到物品模板物品ID: %u", itemid);
LOG_ERROR("custom.modeles","ApplyBuff失败: 无法找到物品模板物品ID: {}", itemid);
return;
}