Exemple #1
0
 public function serial(MemStream $s)
 {
     $s->serial_float($this->X);
     $s->serial_float($this->Y);
     $s->serial_float($this->Z);
     $s->serial_byte($this->Selected);
 }
Exemple #2
0
 public function serial(MemStream $s)
 {
     $s->serial_string($this->SelectionName);
     $s->serial_string($this->ContinentName);
     $s->serial_float($this->MinX);
     $s->serial_float($this->MinY);
     $s->serial_float($this->MaxX);
     $s->serial_float($this->MaxY);
 }
Exemple #3
0
 public function serial(MemStream $s)
 {
     $s->serial_float($this->TrailMinSliceTime);
     $s->serial_float($this->TrailMaxSliceTime);
     $s->serial_float($this->AttackFXOffset, 3);
     $s->serial_string($this->Trail);
     $s->serial_string($this->AdvantageFX);
     $s->serial_string($this->AttackFX);
     $s->serial_float($this->AttackFXRot, 3);
     $s->serial_float($this->ImpactFXDelay);
 }
Exemple #4
0
 public function serial(MemStream $s)
 {
     $s->serial_string($this->Name);
     $s->serial_string($this->ContinentName);
     $s->serial_string($this->BitmapName);
     $s->serial_float($this->MinX);
     $s->serial_float($this->MinY);
     $s->serial_float($this->MaxX);
     $s->serial_float($this->MaxY);
     $this->Children = array();
     $s->serial_uint32($nbChilds);
     for ($j = 0; $j < $nbChilds; $j++) {
         $child = new SMapChild();
         $child->serial($s);
         $this->Children[] = $child;
     }
 }
Exemple #5
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);
 }
 public function serial(MemStream $s)
 {
     // CGenderInfo
     $gi = function (&$var) use($s) {
         $var = new \stdClass();
         $nbItems = 7;
         $s->serial_string($var->Items, $nbItems);
         $s->serial_string($var->Skelfilename);
         $s->serial_string($var->AnimSetBaseName);
         $s->serial_string($var->LodCharacterName);
         $s->serial_float($var->LodCharacterDistance);
         $s->serial_float($var->CharacterScalePos);
         $var->GroundFX = array();
         $s->serial_uint32($nbItems);
         for ($nb = 0; $nb < $nbItems; $nb++) {
             $row = new \stdClass();
             $s->serial_uint32($row->GroundID);
             $s->Serial_string($row->FXName);
             $var->GroundFX[] = $row;
         }
         for ($nb = 0; $nb < 8; $nb++) {
             $s->serial_float($var->BlendShapeMin[$nb]);
             $s->serial_float($var->BlendShapeMax[$nb]);
         }
         $s->serial_float($var->NamePosZLow);
         $s->serial_float($var->NamePosZNormal);
         $s->serial_float($var->NamePosZHigh);
     };
     $numCharacteristice = 8;
     $s->serial_byte($this->CharacStartValue, 8);
     $gi($this->GenderInfos[0]);
     $gi($this->GenderInfos[1]);
     $s->serial_byte($this->People);
     $s->serial_byte($this->Skin);
     $s->serial_string($this->Automaton);
     $this->BodyToBone = new \stdClass();
     $s->serial_string($this->BodyToBone->Head);
     $s->serial_string($this->BodyToBone->Chest);
     $s->serial_string($this->BodyToBone->LeftArm);
     $s->serial_string($this->BodyToBone->RightArm);
     $s->serial_string($this->BodyToBone->LeftHand);
     $s->serial_string($this->BodyToBone->RightHand);
     $s->serial_string($this->BodyToBone->LeftLeg);
     $s->serial_string($this->BodyToBone->RightLeg);
     $s->serial_string($this->BodyToBone->LeftFoot);
     $s->serial_string($this->BodyToBone->RightFoot);
     $s->serial_uint32($nbItems);
     $s->serial_int_string($this->AttackLists, $nbItems);
 }
Exemple #7
0
 public function serial(MemStream $s)
 {
     $s->serial_float($this->X);
     $s->serial_float($this->Y);
 }
Exemple #8
0
 public function serial(MemStream $s)
 {
     $s->serial_string($this->Name);
     $s->serial_string($this->Bone);
     $s->serial_float($this->Offset, 3);
 }
 public function serial(MemStream $s)
 {
     $s->serial_byte($this->Gender);
     $s->serial_uint32($this->Race);
     $s->serial_string($this->SkelFilename);
     $s->serial_string($this->AnimSetBaseName);
     $s->serial_string($this->Automaton);
     $s->serial_float($this->Scale);
     $s->serial_uint32($this->SoundFamily);
     $s->serial_uint32($this->SoundVariation);
     $s->serial_string($this->LodCharacterName);
     $s->serial_float($this->LodCharacterDistance);
     $s->serial_byte($this->Selectable);
     $s->serial_byte($this->Talkable);
     $s->serial_byte($this->Attackable);
     $s->serial_byte($this->Givable);
     $s->serial_byte($this->Mountable);
     $s->serial_byte($this->Turn);
     $s->serial_byte($this->SelectableBySpace);
     $s->serial_uint32($this->HLState);
     $s->serial_float($this->CharacterScalePos);
     $s->serial_float($this->NamePosZLow);
     $s->serial_float($this->NamePosZNormal);
     $s->serial_float($this->NamePosZHigh);
     $s->serial_string($this->Fame);
     // CEquipment::serial()
     $eq = function (&$row) use($s) {
         $row = new \stdClass();
         $s->serial_string($row->Item);
         $s->serial_byte($row->Texture);
         $s->serial_byte($row->Color);
         $s->serial_string($row->BindPoint);
     };
     $eq($this->Body);
     $eq($this->Legs);
     $eq($this->Arms);
     $eq($this->Hands);
     $eq($this->Feet);
     $eq($this->Head);
     $eq($this->Face);
     $eq($this->ObjectInRightHand);
     $eq($this->ObjectInLeftHand);
     $s->serial_byte($this->HairColor);
     $s->serial_byte($this->Skin);
     $s->serial_byte($this->EyesColor);
     $s->serial_float($this->DistToFront);
     $s->serial_float($this->DistToBack);
     $s->serial_float($this->DistToSide);
     $s->serial_float($this->ColRadius);
     $s->serial_float($this->ColHeight);
     $s->serial_float($this->ColLength);
     $s->serial_float($this->ColWidth);
     $s->serial_float($this->MaxSpeed);
     $s->serial_float($this->ClipRadius);
     $s->serial_float($this->ClipHeight);
     $s->serial_uint32($nbItems);
     $s->serial_string($this->AlternativeClothes, $nbItems);
     $this->HairItemList = array();
     $s->serial_uint32($nbItems);
     for ($nb = 0; $nb < $nbItems; $nb++) {
         $eq($this->HairItemList[$nb]);
     }
     $this->GroundFX = array();
     $s->serial_uint32($nbItems);
     for ($nb = 0; $nb < $nbItems; $nb++) {
         $row = new \stdClass();
         $s->serial_uint32($row->GroundID);
         $s->Serial_string($row->FXName);
         $this->GroundFX[] = $row;
     }
     $s->serial_byte($this->DisplayOSD);
     $s->serial_string($this->StaticFX);
     $this->BodyToBone = new \stdClass();
     $s->serial_string($this->BodyToBone->Head);
     $s->serial_string($this->BodyToBone->Chest);
     $s->serial_string($this->BodyToBone->LeftArm);
     $s->serial_string($this->BodyToBone->RightArm);
     $s->serial_string($this->BodyToBone->LeftHand);
     $s->serial_string($this->BodyToBone->RightHand);
     $s->serial_string($this->BodyToBone->LeftLeg);
     $s->serial_string($this->BodyToBone->RightLeg);
     $s->serial_string($this->BodyToBone->LeftFoot);
     $s->serial_string($this->BodyToBone->RightFoot);
     $s->serial_uint32($nbItems);
     $s->serial_string($this->AttackLists, $nbItems);
     // bot object flags
     $s->serial_byte($this->DisplayInRadar);
     $s->serial_byte($this->DisplayOSDName);
     $s->serial_byte($this->DisplayOSDBars);
     $s->serial_byte($this->DisplayOSDForceOver);
     $s->serial_byte($this->Traversable);
     $s->serial_byte($this->RegionForce);
     $s->serial_byte($this->ForceLevel);
     $s->serial_short($this->Level);
     $this->ProjectileCastRay = array();
     $s->serial_uint32($nbItems);
     for ($nb = 0; $nb < $nbItems; $nb++) {
         $row = new \stdClass();
         $s->serial_float($row->Origin, 3);
         $s->serial_float($row->Pos, 3);
         $this->ProjectileCastRay[] = $row;
     }
     $s->serial_byte($this->R2Npc);
 }
Exemple #10
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;
     }
 }