[wizs] 判斷在線玩家的 heal_time 有無錯誤

看板mud_sanc (Sanctuary - 聖殿)作者 (小太保)時間14年前 (2011/08/13 21:14), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
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
文章代碼(AID): #1EHdYao_ (mud_sanc)
文章代碼(AID): #1EHdYao_ (mud_sanc)