public ItemTemp(int id, int userId, int spriteId, int x, int y, double z, string extraData, MovementDirection movement, int value, InteractionTypeTemp pInteraction, int pDistance = 0, int pTeamId = 0) { this.Id = id; this.VirtualUserId = userId; this.SpriteId = spriteId; this.X = x; this.Y = y; this.Z = z; this.ExtraData = extraData; this.Movement = movement; this.Value = value; this.TeamId = pTeamId; this.Distance = pDistance; this.InteractionType = pInteraction; }
public ItemTemp AddTempItem(int vId, int spriteId, int x, int y, double z, string extraData, int value = 0, InteractionTypeTemp pInteraction = InteractionTypeTemp.NONE, MovementDirection movement = MovementDirection.none, int pDistance = 0, int pTeamId = 0) { int id = this._itemTempoId--; ItemTemp Item = new ItemTemp(id, vId, spriteId, x, y, z, extraData, movement, value, pInteraction, pDistance, pTeamId); if (!this._itemsTemp.ContainsKey(Item.Id)) { this._itemsTemp.TryAdd(Item.Id, Item); } this.GetRoom.SendPacket(new ObjectAddComposer(Item)); return(Item); }