Exemple #1
0
        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);
            }
        }
Exemple #2
0
        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);
            }
        }