示例#1
0
            public CombatPresence(AuroraCombatModule module, IScenePresence SP, IConfig m_config)
            {
                m_SP           = SP;
                m_combatModule = module;

                FireOnDeadEvent        = m_config.GetBoolean("FireDeadEvent", false);
                AllowTeamKilling       = m_config.GetBoolean("AllowTeamKilling", true);
                AllowTeams             = m_config.GetBoolean("AllowTeams", false);
                SendTeamKillerInfo     = m_config.GetBoolean("SendTeamKillerInfo", false);
                TeamHitsBeforeSend     = m_config.GetFloat("TeamHitsBeforeSend", 3);
                DamageToTeamKillers    = m_config.GetFloat("DamageToTeamKillers", 100);
                MaximumHealth          = m_config.GetFloat("MaximumHealth", 100);
                MaximumDamageToInflict = m_config.GetFloat("MaximumDamageToInflict", 100);
                m_RespawnPosition.X    = m_config.GetFloat("RespawnPositionX", 128);
                m_RespawnPosition.Y    = m_config.GetFloat("RespawnPositionY", 128);
                m_RespawnPosition.Z    = m_config.GetFloat("RespawnPositionZ", 128);
                m_SecondsBeforeRespawn = m_config.GetInt("SecondsBeforeRespawn", 5);
                m_shouldRespawn        = m_config.GetBoolean("ShouldRespawn", false);

                HasLeftCombat = false;
                m_Team        = "No Team";

                SP.OnAddPhysics    += SP_OnAddPhysics;
                SP.OnRemovePhysics += SP_OnRemovePhysics;

                //Use this to fix the avatars health
                m_healthtimer.Interval = 1000; // 1 sec
                m_healthtimer.Enabled  = true;
                m_healthtimer.Elapsed += new System.Timers.ElapsedEventHandler(fixAvatarHealth_Elapsed);
            }
示例#2
0
 public void Close()
 {
     m_combatModule = null;
     m_healthtimer.Stop();
     m_healthtimer.Close();
     m_SP.OnAddPhysics    -= SP_OnAddPhysics;
     m_SP.OnRemovePhysics -= SP_OnRemovePhysics;
     SP_OnRemovePhysics();
     m_SP = null;
 }
示例#3
0
            public CombatObject(AuroraCombatModule module, SceneObjectPart part, IConfig m_config)
            {
                m_part         = part;
                m_combatModule = module;

                MaximumHealth          = m_config.GetFloat("MaximumHealth", 100);
                MaximumDamageToInflict = m_config.GetFloat("MaximumDamageToInflict", 100);


                m_Team = "No Team";

                m_part.OnAddPhysics    += AddPhysics;
                m_part.OnRemovePhysics += RemovePhysics;
            }
示例#4
0
            public CombatObject(AuroraCombatModule module, SceneObjectPart part, IConfig m_config)
            {
                m_part = part;
                m_combatModule = module;
                
                MaximumHealth = m_config.GetFloat("MaximumHealth", 100);
                MaximumDamageToInflict = m_config.GetFloat("MaximumDamageToInflict", 100);


                m_Team = "No Team";

                m_part.OnAddPhysics += AddPhysics;
                m_part.OnRemovePhysics += RemovePhysics;
            }
示例#5
0
            public CombatPresence(AuroraCombatModule module, ScenePresence SP, IConfig m_config)
            {
                m_SP = SP;
                m_combatModule = module;

                FireOnDeadEvent = m_config.GetBoolean("FireDeadEvent", false);
                AllowTeamKilling = m_config.GetBoolean("AllowTeamKilling", true);
                AllowTeams = m_config.GetBoolean("AllowTeams", false);
                SendTeamKillerInfo = m_config.GetBoolean("SendTeamKillerInfo", false);
                TeamHitsBeforeSend = m_config.GetFloat("TeamHitsBeforeSend", 3);
                DamageToTeamKillers = m_config.GetFloat("DamageToTeamKillers", 100);
                MaximumHealth = m_config.GetFloat("MaximumHealth", 100);
                MaximumDamageToInflict = m_config.GetFloat("MaximumDamageToInflict", 100);
                m_RespawnPosition.X = m_config.GetFloat("RespawnPositionX", 128);
                m_RespawnPosition.Y = m_config.GetFloat("RespawnPositionY", 128);
                m_RespawnPosition.Z = m_config.GetFloat("RespawnPositionZ", 128);
                m_SecondsBeforeRespawn = m_config.GetInt("SecondsBeforeRespawn", 5);
                m_shouldRespawn = m_config.GetBoolean("ShouldRespawn", false);

                HasLeftCombat = false;
                m_Team = "No Team";

                SP.OnAddPhysics += new ScenePresence.AddPhysics(SP_OnAddPhysics);
                SP.OnRemovePhysics += new ScenePresence.RemovePhysics(SP_OnRemovePhysics);
            }
示例#6
0
 public void Close()
 {
     m_healthtimer.Stop();
     m_healthtimer.Close();
     m_SP.OnAddPhysics -= SP_OnAddPhysics;
     m_SP.OnRemovePhysics -= SP_OnRemovePhysics;
     SP_OnRemovePhysics();
     m_combatModule = null;
     m_SP = null;
 }
示例#7
0
            public CombatPresence(AuroraCombatModule module, IScenePresence SP, IConfig m_config)
            {
                m_SP = SP;
                m_combatModule = module;

                HasLeftCombat = false;
                m_Team = "No Team";

                SP.OnAddPhysics += SP_OnAddPhysics;
                SP.OnRemovePhysics += SP_OnRemovePhysics;

                //Use this to fix the avatars health
                m_healthtimer.Interval = 1000; // 1 sec
                m_healthtimer.Elapsed += fixAvatarHealth_Elapsed;
                m_healthtimer.Start();
            }
示例#8
0
            public CombatPresence (AuroraCombatModule module, IScenePresence SP, IConfig m_config)
            {
                m_SP = SP;
                m_combatModule = module;

                FireOnDeadEvent = m_config.GetBoolean("FireDeadEvent", false);
                AllowTeamKilling = m_config.GetBoolean("AllowTeamKilling", true);
                AllowTeams = m_config.GetBoolean("AllowTeams", false);
                SendTeamKillerInfo = m_config.GetBoolean("SendTeamKillerInfo", false);
                TeamHitsBeforeSend = m_config.GetFloat("TeamHitsBeforeSend", 3);
                DamageToTeamKillers = m_config.GetFloat("DamageToTeamKillers", 100);
                MaximumHealth = m_config.GetFloat("MaximumHealth", 100);
                MaximumDamageToInflict = m_config.GetFloat("MaximumDamageToInflict", 100);
                m_RespawnPosition.X = m_config.GetFloat("RespawnPositionX", 128);
                m_RespawnPosition.Y = m_config.GetFloat("RespawnPositionY", 128);
                m_RespawnPosition.Z = m_config.GetFloat("RespawnPositionZ", 128);
                m_SecondsBeforeRespawn = m_config.GetInt("SecondsBeforeRespawn", 5);
                m_shouldRespawn = m_config.GetBoolean("ShouldRespawn", false);

                HasLeftCombat = false;
                m_Team = "No Team";

                SP.OnAddPhysics += SP_OnAddPhysics;
                SP.OnRemovePhysics += SP_OnRemovePhysics;

                //Use this to fix the avatars health
                m_healthtimer.Interval = 1000; // 1 sec
                m_healthtimer.Enabled = true;
                m_healthtimer.Elapsed += new System.Timers.ElapsedEventHandler (fixAvatarHealth_Elapsed);
            }