[wizs] 判斷在線玩家的 heal_time 有無錯誤
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
mud_sanc 近期熱門文章
PTT遊戲區 即時熱門文章
21
49