作者laechan (小太保)
看板mud_sanc
标题[wizs] 判断在线玩家的 heal_time 有无错误
时间Sat Aug 13 21:14:08 2011
int check_heal_time()
{
mixed usr=users(),heal_times=({});
object ppl;
string tmp,str="发现的 bug 情况有: ";
foreach(ppl in usr)
{
if(!ppl) continue;
if(undefinedp(ppl->query_temp("heal_time")))
continue;
heal_times=keys((mapping)ppl->query_temp("heal_time"));
foreach(tmp in heal_times)
{
if(ppl->query_temp("heal_time/"+tmp)>0 &&
!mapp(ppl->query_temp(tmp)))
{
str+=sprintf("%-11s : %s = %s\n",ppl->query("name"),tmp,
identify(ppl->query_temp(tmp)));
}
}
}
write(str+"\n");
return 1;
}
主要是对照有设进 heal_time 的参数 key_name,有没有对映的
temp_data[key_name] 资料栏、以及该资料栏是否为 mapping格
式。
今天有发现玩家 yuri 可能有上述问题,而造成其心跳停止的情
况出现。
Laechan
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 111.253.165.115