Exemplo n.º 1
0
        }                //necessary for SignalR receive

        internal Hunt(ushort _id, HuntRank r)
        {
            WorldId      = Program.mem.GetServerId();
            Id           = _id;
            Rank         = r;
            LastReported = DateTime.MinValue;
        }
Exemplo n.º 2
0
 private void CheckAndPlaySound(HuntRank r)
 {
     try
     {
         if (w1.sounds.TryGetValue(r, out var soundPlayer))
         {
             _ = SoundPlayer.Play(soundPlayer);
         }
     }
     catch (Exception ex) { LogHost.Default.ErrorException(nameof(CheckAndPlaySound), ex); }
 }
Exemplo n.º 3
0
 private void CheckAndPlaySound(HuntRank r)
 {
     try
     {
         if (r == HuntRank.S && Settings.Default.SPlaySound && Settings.Default.SBell != Resources.NoSoundAlert)
         {
             w1.Ssp.Play();
         }
         else if (r == HuntRank.A && Settings.Default.APlaySound && Settings.Default.ABell != Resources.NoSoundAlert)
         {
             w1.Asp.Play();
         }
         else if (r == HuntRank.B && Settings.Default.BPlaySound && Settings.Default.BBell != Resources.NoSoundAlert)
         {
             w1.Bsp.Play();
         }
         else if (r == HuntRank.FATE && Settings.Default.FATEPlaySound && Settings.Default.FATEBell != Resources.NoSoundAlert)
         {
             w1.FATEsp.Play();
         }
     }
     catch (Exception ex) { LogHost.Default.ErrorException(nameof(CheckAndPlaySound), ex); }
 }
Exemplo n.º 4
0
 internal static bool TryGetHuntRank(ushort HuntID, out HuntRank hr) => (RankMap.TryGetValue(HuntID, out hr)) ? true : false;
Exemplo n.º 5
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            switch (version)
            {
/*				case 2:
 *                                      {
 *                                              Hallucinating = ( bool )reader.ReadBool();
 *                                              goto case 1;
 *                                      }*/
            case 1:
            {
                IsMarried                 = ( bool )reader.ReadBool();
                m_AllowGayMarriages       = ( bool )reader.ReadBool();
                m_AllowCelestialMarriages = ( bool )reader.ReadBool();
                m_MarriageTime            = reader.ReadDateTime();
                m_WifeLoc                 = reader.ReadPoint3D();
                m_HusbandLoc              = reader.ReadPoint3D();
                m_MaritalStatus           = ( MaritalStatus )reader.ReadInt();
                m_TypeOfMarriage          = ( TypeOfMarriage )reader.ReadInt();
                m_FirstName               = ( string )reader.ReadString();
                m_LastName                = ( string )reader.ReadString();
                m_MaidenName              = ( string )reader.ReadString();
                m_RankPoints              = reader.ReadInt();

                /*GD13_HS_Start_5*/
                m_HuntMode     = ( HuntMode )reader.ReadInt();
                m_HuntRank     = ( HuntRank )reader.ReadInt();
                m_HuntReward   = ( HuntReward )reader.ReadInt();
                m_Hunting      = ( bool )reader.ReadBool();
                m_EasyKills    = reader.ReadInt();
                m_HardKills    = reader.ReadInt();
                m_ExtremeKills = reader.ReadInt();
                m_GodKills     = reader.ReadInt();
                /*GD13_HS_End_5*/
                goto case 0;
            }

            case 0:
            {
                m_Class             = ( PlayerClasses )reader.ReadInt();
                m_Race              = ( PlayerRaces )reader.ReadInt();
                m_Tribe             = ( PlayerTribes )reader.ReadInt();
                m_Rank              = ( PlayerRanks )reader.ReadInt();
                m_RewardsClaimed    = reader.ReadInt();
                m_Level             = reader.ReadInt();
                m_SkillPts          = reader.ReadInt();
                m_Experience        = reader.ReadInt();
                m_Age               = reader.ReadInt();
                m_NextLevelUp       = reader.ReadInt();
                m_Updated           = reader.ReadBool();
                m_Bioenginer        = reader.ReadBool();
                NextSmithBulkOrder  = reader.ReadTimeSpan();
                NextTailorBulkOrder = reader.ReadTimeSpan();
                //NextFletcherBulkOrder = reader.ReadTimeSpan();
                //NextCarpenterBulkOrder = reader.ReadTimeSpan();
                //NextTinkerBulkOrder = reader.ReadTimeSpan();
                //NextTamingBulkOrder = reader.ReadTimeSpan();
                m_BOBFilter = new Engines.BulkOrders.BOBFilter(reader);
                //m_TinkBOBFilter = new Engines.BulkOrders.TinkBOBFilter( reader );
                //m_TamingBOBFilter = new Engines.BulkOrders.TamingBOBFilter( reader );
                m_Flags = (MyPlayerFlag)reader.ReadInt();
                break;
            }
            }

            if (m_BOBFilter == null)
            {
                m_BOBFilter = new Engines.BulkOrders.BOBFilter();
            }

/*			if ( m_TinkBOBFilter == null )
 *                              m_TinkBOBFilter = new Engines.BulkOrders.TinkBOBFilter();
 *
 *                      if ( m_TamingBOBFilter == null )
 *                              m_TamingBOBFilter = new Engines.BulkOrders.TamingBOBFilter();*/
        }
Exemplo n.º 6
0
 internal static bool TryGetHuntRank(ushort HuntID, out HuntRank hr)
 {
     return(Hunt.RankMap.TryGetValue(HuntID, out hr));
 }
Exemplo n.º 7
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
			
			switch( version )
			{
/*				case 2:
					{
						Hallucinating = ( bool )reader.ReadBool();
						goto case 1;
					}*/
				case 1:
					{
						IsMarried = ( bool )reader.ReadBool();
						m_AllowGayMarriages = ( bool )reader.ReadBool();
						m_AllowCelestialMarriages = ( bool )reader.ReadBool();
						m_MarriageTime = reader.ReadDateTime();
						m_WifeLoc = reader.ReadPoint3D();
						m_HusbandLoc = reader.ReadPoint3D();
						m_MaritalStatus = ( MaritalStatus )reader.ReadInt();
						m_TypeOfMarriage = ( TypeOfMarriage )reader.ReadInt();
						m_FirstName = ( string )reader.ReadString();
						m_LastName = ( string )reader.ReadString();
						m_MaidenName = ( string )reader.ReadString();
						m_RankPoints = reader.ReadInt();
						
						/*GD13_HS_Start_5*/
						m_HuntMode = ( HuntMode )reader.ReadInt();
						m_HuntRank = ( HuntRank )reader.ReadInt();
						m_HuntReward = ( HuntReward )reader.ReadInt();
						m_Hunting = ( bool )reader.ReadBool();
						m_EasyKills = reader.ReadInt();
						m_HardKills = reader.ReadInt();
						m_ExtremeKills = reader.ReadInt();
						m_GodKills = reader.ReadInt();
						/*GD13_HS_End_5*/
						goto case 0;
					}
					
				case 0:
					{
						m_Class = ( PlayerClasses )reader.ReadInt();
						m_Race = ( PlayerRaces )reader.ReadInt();
						m_Tribe = ( PlayerTribes )reader.ReadInt();
						m_Rank = ( PlayerRanks )reader.ReadInt();
						m_RewardsClaimed = reader.ReadInt();
						m_Level = reader.ReadInt();
						m_SkillPts = reader.ReadInt();
						m_Experience = reader.ReadInt();
						m_Age = reader.ReadInt();
						m_NextLevelUp = reader.ReadInt();
						m_Updated = reader.ReadBool();
						m_Bioenginer = reader.ReadBool();
						NextSmithBulkOrder = reader.ReadTimeSpan();
						NextTailorBulkOrder = reader.ReadTimeSpan();
						//NextFletcherBulkOrder = reader.ReadTimeSpan();
						//NextCarpenterBulkOrder = reader.ReadTimeSpan();
						//NextTinkerBulkOrder = reader.ReadTimeSpan();
						//NextTamingBulkOrder = reader.ReadTimeSpan();
						m_BOBFilter = new Engines.BulkOrders.BOBFilter( reader );
						//m_TinkBOBFilter = new Engines.BulkOrders.TinkBOBFilter( reader );
						//m_TamingBOBFilter = new Engines.BulkOrders.TamingBOBFilter( reader );
						m_Flags = (MyPlayerFlag)reader.ReadInt();
						break;
					}
			}
			
			if ( m_BOBFilter == null )
				m_BOBFilter = new Engines.BulkOrders.BOBFilter();
			
/*			if ( m_TinkBOBFilter == null )
				m_TinkBOBFilter = new Engines.BulkOrders.TinkBOBFilter();
			
			if ( m_TamingBOBFilter == null )
				m_TamingBOBFilter = new Engines.BulkOrders.TamingBOBFilter();*/
		}