private void ObjectDie(DOLEvent e, object sender, EventArgs arguments) { m_hookpointTimer.Start(300000); //5*60*1000 = 5 min GameEventMgr.RemoveHandler(m_object, GameLivingEvent.Dying, new DOLEventHandler(ObjectDie)); var item = DOLDB <DBKeepHookPointItem> .SelectObject(DB.Column(nameof(DBKeepHookPointItem.KeepID)).IsEqualTo(Component.Keep.KeepID).And(DB.Column(nameof(DBKeepHookPointItem.ComponentID)).IsEqualTo(Component.ID)).And(DB.Column(nameof(DBKeepHookPointItem.HookPointID)).IsEqualTo(ID))); if (item != null) { GameServer.Database.DeleteObject(item); } }
private void ObjectDie(DOLEvent e, object sender, EventArgs arguments) { m_hookpointTimer.Start(300000); //5*60*1000 = 5 min GameEventMgr.RemoveHandler(m_object, GameLivingEvent.Dying, new DOLEventHandler(ObjectDie)); DBKeepHookPointItem item = GameServer.Database.SelectObject <DBKeepHookPointItem>("KeepID = '" + Component.AbstractKeep.KeepID + "' AND ComponentID = '" + Component.ID + "' AND HookPointID = '" + ID + "'"); if (item != null) { GameServer.Database.DeleteObject(item); } }
private void ObjectDie(DOLEvent e, object sender, EventArgs arguments) { m_hookpointTimer.Start(300000); //5*60*1000 = 5 min GameEventMgr.RemoveHandler(m_object, GameLivingEvent.Dying, new DOLEventHandler(ObjectDie)); DBKeepHookPointItem item = GameServer.Database.SelectObjects <DBKeepHookPointItem>("`KeepID` = @KeepID AND `ComponentID` = @ComponentID AND `HookPointID` @HookPointID", new[] { new QueryParameter("@KeepID", Component.AbstractKeep.KeepID), new QueryParameter("@ComponentID", Component.ID), new QueryParameter("@HookPointID", ID) }).FirstOrDefault(); if (item != null) { GameServer.Database.DeleteObject(item); } }
private void ObjectDie(DOLEvent e, object sender, EventArgs arguments) { m_hookpointTimer.Start(300000); //5*60*1000 = 5 min GameEventMgr.RemoveHandler(m_object, GameLivingEvent.Dying, new DOLEventHandler(ObjectDie)); }