示例#1
0
 public function serial(MemStream $s)
 {
     $s->serial_uint32($nbItems);
     $s->serial_uint32($this->UsedSkills, $nbItems);
     $s->serial_uint32($this->BrickFamily);
     $s->serial_byte($this->IndexInFamily);
     $s->serial_byte($this->Level);
     $s->serial_string($this->sTmp);
     $s->serial_string($this->Icon, 4);
     $s->serial_sint32($this->IconColor, 4);
     $s->serial_sint32($this->SabrinaCost);
     $s->serial_float($this->SabrinaRelativeCost);
     $s->serial_uint32($nbItems);
     $s->serial_short($this->MandatoryFamilies, $nbItems);
     $s->serial_uint32($nbItems);
     $s->serial_short($this->OptionalFamilies, $nbItems);
     $s->serial_uint32($nbItems);
     $s->serial_short($this->ParameterFamilies, $nbItems);
     $s->serial_uint32($nbItems);
     $s->serial_short($this->CreditFamilies, $nbItems);
     $s->serial_string($this->ForbiddenDef);
     $s->serial_string($this->ForbiddenExclude);
     $this->FaberPlan = new CFaberPlan();
     $this->FaberPlan->serial($s);
     $this->Properties = array();
     $s->serial_uint32($nbItems);
     for ($nb = 0; $nb < $nbItems; $nb++) {
         $row = new \stdClass();
         $s->serial_string($row->Text);
         $this->Properties[] = $row;
     }
     $s->serial_byte($this->MinCastTime);
     $s->serial_byte($this->MaxCastTime);
     $s->serial_byte($this->MinRange);
     $s->serial_byte($this->MaxRange);
     $s->serial_uint64($this->BrickRequiredFlags);
     $s->serial_uint32($this->SPCost);
     $s->serial_uint32($this->ActionNature);
     $this->RequiredSkills = array();
     $s->serial_uint32($nbItems);
     for ($nb = 0; $nb < $nbItems; $nb++) {
         $row = new CRequiredSkill();
         $row->serial($s);
         $this->RequiredSkills[] = $row;
     }
     $s->serial_uint32($nbItems);
     $s->serial_uint32($this->RequiredBricks, $nbItems);
     $s->serial_byte($this->AvoidCyclic);
     $s->serial_byte($this->UsableWithEmptyHands);
     $s->serial_uint32($this->CivRestriction);
     $s->serial_sint32($this->FactionIndex);
     $s->serial_sint32($this->MinFameValue);
     $s->serial_uint32($this->MagicResistType);
 }
示例#2
0
 public function serial(MemStream $s)
 {
     $s->serial_uint32($this->WeaponType);
     $s->serial_uint32($this->Skill);
     $s->serial_uint32($this->DamageType);
     $s->serial_sint32($this->MeleeRange);
 }
示例#3
0
 /**
  * @param MemStream $s
  */
 public function serial(MemStream $s)
 {
     $s->serialVersion($this->version);
     $s->serial_sint32($this->X);
     $s->serial_sint32($this->Y);
 }
示例#4
0
 /**
  * @param MemStream $s
  */
 public function serial(MemStream $s)
 {
     $s->serial_string($this->MaleShape);
     $s->serial_string($this->FemaleShape);
     $s->serial_uint64($this->SlotBF);
     $s->serial_uint32($this->MapVariant);
     $s->serial_uint32($this->Family);
     $s->serial_uint32($this->ItemType);
     $s->serial_string($this->Icon, 4);
     $s->serial_sint32($this->IconColor, 4);
     $s->serial_string($this->IconText);
     $s->serial_string($this->AnimSet);
     $s->serial_sint8($this->Color);
     $s->serial_byte($this->HasFx);
     $s->serial_byte($this->DropOrSell);
     $s->serial_byte($this->IsItemNoRent);
     $s->serial_byte($this->NeverHideWhenEquiped);
     $s->serial_uint32($this->Stackable);
     $s->serial_byte($this->IsConsumable);
     $s->serial_float($this->Bulk);
     $s->serial_uint32($this->EquipTime);
     $this->FX = new CFX();
     $this->FX->serial($s);
     $s->serial_uint32($nbItems);
     $this->StaticFXs = array();
     for ($fx = 0; $fx < $nbItems; $fx++) {
         $sfx = new CStaticFX();
         $sfx->serial($s);
         $this->StaticFXs[] = $sfx;
     }
     $s->serial_string($this->Effect, 4);
     $s->serial_uint32($nbItems);
     $this->MpItemParts = array();
     for ($mp = 0; $mp < $nbItems; $mp++) {
         $row = new CMpItemPart();
         $row->serial($s);
         $this->MpItemParts[] = $row;
     }
     $s->serial_uint32($this->CraftPlan);
     $s->serial_uint32($this->RequiredCharac);
     $s->serial_short($this->RequiredCharacLevel);
     $s->serial_uint32($this->RequiredSkill);
     $s->serial_short($this->RequiredSkillLevel);
     $s->serial_uint32($this->ItemOrigin);
     switch ($this->Family) {
         case EItemFamily::ARMOR:
             $this->Armor = new CArmor();
             $this->Armor->serial($s);
             break;
         case EItemFamily::MELEE_WEAPON:
             $this->MeleeWeapon = new CMeleeWeapon();
             $this->MeleeWeapon->serial($s);
             break;
         case EItemFamily::RANGE_WEAPON:
             $this->RangeWeapon = new CRangeWeapon();
             $this->RangeWeapon->serial($s);
             break;
         case EItemFamily::AMMO:
             $this->Ammo = new CAmmo();
             $this->Ammo->serial($s);
             break;
         case EItemFamily::RAW_MATERIAL:
             $this->Mp = new CMp();
             $this->Mp->serial($s);
             break;
         case EItemFamily::SHIELD:
             $this->Shield = new CShield();
             $this->Shield->serial($s);
             break;
         case EItemFamily::CRAFTING_TOOL:
         case EItemFamily::HARVEST_TOOL:
         case EItemFamily::TAMING_TOOL:
             $this->Tool = new CTool();
             $this->Tool->serial($s);
             break;
         case EItemFamily::TELEPORT:
             $this->Teleport = new CTeleport();
             $this->Teleport->serial($s);
             break;
         case EItemFamily::PET_ANIMAL_TICKET:
             $this->Pet = new CPet();
             $this->Pet->serial($s);
             break;
         case EItemFamily::GUILD_OPTION:
             $this->GuildOption = new CGuildOption();
             $this->GuildOption->serial($s);
             break;
         case EItemFamily::COSMETIC:
             $this->Cosmetic = new CCosmetic();
             $this->Cosmetic->serial($s);
             break;
         case EItemFamily::CONSUMABLE:
             $this->Consumable = new CConsumable();
             $this->Consumable->serial($s);
             break;
         case EItemFamily::SCROLL:
             $this->Scroll = new CScroll();
             $this->Scroll->serial($s);
             break;
     }
 }