public LevelPropAnimation( ILevelProp lp, string animationName, float unk1 = 0.0f, float animationTime = 0.0f, int unk2 = 1, int unk3 = 1, bool deletePropAfterAnimationFinishes = false) : base(PacketCmd.PKT_S2C_LEVEL_PROP_ANIMATION) { WriteConstLengthString(animationName, 64); Write(unk1); Write(animationTime); WriteNetId(lp); Write(unk2); Write(unk3); byte delete = 0x00; if (deletePropAfterAnimationFinishes) { delete = 0x01; } Write(delete); // Most likely deletes prop after animation ends when set to 1 Write((byte)0x00); Write((byte)0x00); }
public LevelPropSpawn(ILevelProp lp) : base(PacketCmd.PKT_S2C_LEVEL_PROP_SPAWN) { WriteNetId(lp); Write((byte)0x40); // unk Write(lp.SkinId); Write((byte)0); Write((byte)0); Write((byte)0); // Unk Write(lp.X); Write(lp.Z); Write(lp.Y); Write(0.0f); // Rotation Y Write(lp.DirX); Write(lp.DirZ); Write(lp.DirY); Write(lp.Unk1); Write(lp.Unk2); Write(1.0f); Write(1.0f); Write(1.0f); // Scaling Write((int)lp.Team); // Probably a short Write(2); // nPropType [size 1 . 4] (4.18) -- if is a prop, become unselectable and use direction params WriteConstLengthString(lp.Name, 64); WriteConstLengthString(lp.Model, 64); }
public void NotifyLevelPropSpawn(int userId, ILevelProp levelProp) { var levelPropSpawnPacket = new LevelPropSpawn(levelProp); _packetHandlerManager.SendPacket(userId, levelPropSpawnPacket, Channel.CHL_S2C); }
public LevelPropSpawnResponse(int userId, ILevelProp levelProp) { UserId = userId; LevelProp = levelProp; }