예제 #1
0
 private static function reloadParties()
 {
     $table = GWF_TABLE_PREFIX . 'sr4_party';
     $query = "SELECT * FROM {$table} WHERE sr4pa_action='talk' OR sr4pa_action='fight' OR sr4pa_action='sleep' OR sr4pa_action='travel' OR sr4pa_action='explore' OR sr4pa_action='goto' OR sr4pa_action='hunt'";
     $db = gdo_db();
     if (false === ($result = $db->queryRead($query))) {
         return false;
     }
     while (false !== ($row = $db->fetchAssoc($result))) {
         $pid = (int) $row['sr4pa_id'];
         $party = new SR_Party($row);
         if (true === $party->initMembers()) {
             self::$parties[$pid] = $party;
         }
     }
     $db->free($result);
     return true;
 }