public override void Process() { Item item = TeraObject.GetObject(ItemUid) as Item; if (item != null) { PlayerLogic.PickUpItem(Connection, item); } }
public override void Read() { int tarCount = ReadH(); int tarShift = ReadH(); int posCount = ReadH(); int posShift = ReadH(); int skillId = ReadD() - 0x04000000; float x = ReadF(); float y = ReadF(); float z = ReadF(); short heading = (short)ReadH(); if (tarCount > 0) { Reader.BaseStream.Seek(tarShift - 4, SeekOrigin.Begin); } for (int i = 0; i < tarCount; i++) { ReadD(); long uniqueId = ReadQ(); Creature creature = TeraObject.GetObject(uniqueId) as Creature; if (creature != null) { Targets.Add(creature); } } if (posCount > 0) { Reader.BaseStream.Seek(posShift - 4, SeekOrigin.Begin); } for (int i = 0; i < posCount; i++) { ReadD(); ArgsList.Add( new UseSkillArgs { IsTargetAttack = true, SkillId = skillId, StartPosition = new WorldPosition { X = x, Y = y, Z = z, Heading = heading, }, TargetPosition = new WorldPosition { X = ReadF(), Y = ReadF(), Z = ReadF(), Heading = heading, }, Targets = Targets, }); } }