下面仅仅提供连个Player的函数。函数功能就是交换竞技场点数和荣誉点数。。实现两种点数的互换
通常可以用在脚本里面和GM命令里面。这里仅仅提供函数参考。
你需要把下面量个函数加入到你的Player.cpp和Player.h文件中。
void Player::jjctohonor()
{
int bs = sConfig.GetIntDefault("Jjc.Beishu",10);
if (GetArenaPoints() >= 100)
{
ModifyArenaPoints(-100);
ModifyHonorPoints(90*bs);
}
else
GetSession()->SendNotification("点数不足");
}
void Player::honortojjc()
{
int bs = sConfig.GetIntDefault("Jjc.Beishu",10);
if (GetHonorPoints() >= 100*bs)
{
ModifyHonorPoints(-int32(100*bs));
ModifyArenaPoints(90);
}
else
GetSession()->SendNotification("点数不足");
}