public override void SendInteract(Player Plr, InteractMenu Menu) { if (IsDead && Loots != null) { Loots.SendInteract(Plr, Menu); if (!Loots.IsLootable()) { SetLootable(false, Plr); } } base.SendInteract(Plr, Menu); }
public override void SendInteract(Player Plr, InteractMenu Menu) { Tok_Info Info = WorldMgr.GetTok(Spawn.Proto.TokUnlock); if (!IsDead) { Plr.QtsInterface.HandleEvent(Objective_Type.QUEST_USE_GO, Spawn.Entry, 1); } if (Spawn.Proto.TokUnlock != 0) { Plr.TokInterface.AddTok(Info); } Loot Loots = LootsMgr.GenerateLoot(this, Plr); if (Loots != null) { Loots.SendInteract(Plr, Menu); // If object has been looted, make it unlootable // and then Reset its lootable staus in XX seconds if (!Loots.IsLootable()) { Looted = true; foreach (Object Obj in this._ObjectRanged) { if (Obj.IsPlayer()) { this.SendMeTo(Obj.GetPlayer()); } } EvtInterface.AddEvent(ResetLoot, RELOOTABLE_TIME, 1); } } base.SendInteract(Plr, Menu); }
public override void SendInteract(Player Plr, InteractMenu Menu) { Log.Success("SendInteract", "" + Name + " -> " + Plr.Name + ",Type=" + InteractType); PacketOut Out = new PacketOut((byte)Opcodes.F_SET_ABILITY_TIMER); Out.WriteByte(0); // 00 Out.WriteByte(1); // 01 Out.WriteByte(1); // 01 Out.WriteByte(5); // 05 Out.WriteUInt16(0); //00 00 Out.WriteUInt16(Spawn.GameObjTimer); // 13 88 =5000 Out.WriteUInt16(Oid); Out.WriteUInt16(0); Plr.SendPacket(Out); if (Spawn.GameObjTimer == 0) { Out = new PacketOut((byte)Opcodes.F_SET_ABILITY_TIMER); Out.WriteByte(0); // 00 Out.WriteByte(1); // 01 Out.WriteByte(1); // 01 Out.WriteUInt16(0); //00 00 Out.WriteUInt16(0); // 13 88 Out.WriteUInt16(0); Out.WriteUInt16(0); Out.WriteByte(0); Plr.SendPacket(Out); } Out = new PacketOut((byte)Opcodes.F_PLAY_EFFECT); Out.WriteUInt16((UInt16)0x0144); Out.WriteByte(0);// 00 Out.WriteUInt16((UInt16)Spawn.WorldZ); Out.WriteUInt32((UInt32)Spawn.WorldX); Out.WriteUInt32((UInt32)Spawn.WorldY); Out.WriteUInt16(0x0017);// 00 17 Out.Fill(0, 5); Plr.SendPacket(Out); Tok_Info Info = WorldMgr.GetTok(Spawn.Proto.TokUnlock); if (!IsDead) { Plr.QtsInterface.HandleEvent(Objective_Type.QUEST_USE_GO, Spawn.Entry, 1); } if (Spawn.Proto.TokUnlock != 0) { Plr.TokInterface.AddTok(Info); } Loot Loots = LootsMgr.GenerateLoot(this, Plr); if (Loots != null) { Loots.SendInteract(Plr, Menu); // If object has been looted, make it unlootable // and then Reset its lootable staus in XX seconds if (!Loots.IsLootable()) { Looted = true; foreach (Object Obj in this._ObjectRanged) { if (Obj.IsPlayer()) { this.SendMeTo(Obj.GetPlayer()); } } EvtInterface.AddEvent(ResetLoot, RELOOTABLE_TIME, 1); } } if (Spawn.DoorId != 0) { if (DoorOpen) { CloseDoor(); } else { OpenDoor(); } } base.SendInteract(Plr, Menu); }