コード例 #1
0
ファイル: Profession.cs プロジェクト: karliky/wowwow
		public Profession( ProfessionLevels t, int i, int casttime, int cooldown )
		{
			level = t;
			if ( casttime == 0 )
				casttime = 2500;
			coolDown = cooldown;
			castingTime = casttime;
			id = i;
			switch( level )
			{
				case ProfessionLevels.Apprentice:
					Current = 15;
					Max = 75;
					break;
				case ProfessionLevels.Journeyman:
					Max = 150;
					break;
				case ProfessionLevels.Expert:
					Max = 225;
					break;
				case ProfessionLevels.Artisan:
					Max = 300;
					break;
			}
		}
コード例 #2
0
 /*
  * Author: Dr Nexus
  *
  * On learning professions.
  *
  * Parameter c Character to learn profession on.
  * Paramter level Profession level.
  * Return learn profession or default code.
  */
 public bool OnLearnProfession(Character c, ProfessionLevels level,
                               Professions type)
 {
     if (level == ProfessionLevels.Apprentice)
     {
         if (type == Professions.Miner)
         {
             c.LearnSpell(2580);
             c.LearnSpell(2577);
             c.LearnSpell(2657);
             c.LearnSpell(2656);
             c.Copper -= 100;
             return(false);                    // do not add the default learning list
         }
         if (type == Professions.Herborist)
         {
             c.LearnSpell(3570);
             return(false);                    // do not add the default learning list
         }
         if (type == Professions.Blacksmith)
         {
             c.LearnSpell(2738);               // copper axe
             c.LearnSpell(2739);               // copper sword
             c.LearnSpell(2737);               // copper mace
             c.LearnSpell(3293);               // copper battle axe
             c.LearnSpell(3292);               // copper heavy broadsword
             return(false);                    // do not add the default learning list
         }
         if (type == Professions.LeatherWorker)
         {
             return(false);                    // do not add the default learning list
         }
     }
     return(true);            // execute the default code
 }
コード例 #3
0
        public Profession(ProfessionLevels t, int i, int casttime, int cooldown)
        {
            level = t;
            if (casttime == 0)
            {
                casttime = 2500;
            }
            coolDown    = cooldown;
            castingTime = casttime;
            id          = i;
            switch (level)
            {
            case ProfessionLevels.Apprentice:
                Current = 15;
                Max     = 75;
                break;

            case ProfessionLevels.Journeyman:
                Max = 150;
                break;

            case ProfessionLevels.Expert:
                Max = 225;
                break;

            case ProfessionLevels.Artisan:
                Max = 300;
                break;
            }
        }
コード例 #4
0
        public override void Deserialize(GenericReader gr, int ind, bool fake)
        {
            base.Deserialize(gr, ind, true);
            int version = gr.ReadInt();

            id    = gr.ReadInt();
            level = (ProfessionLevels)gr.ReadShort();
            //	castingTime = gr.ReadInt();
            //	coolDown = gr.ReadInt();
        }
コード例 #5
0
ファイル: Profession.cs プロジェクト: karliky/wowwow
		public Profession( ProfessionLevels t, int i, ushort cur, ushort ind ) : base( cur, ind )
		{
			level = t;
			id = i;
			switch( level )
			{
				case ProfessionLevels.Apprentice:
					Current = 15;
					Max = 75;
					break;
				case ProfessionLevels.Journeyman:
					Max = 150;
					break;
				case ProfessionLevels.Expert:
					Max = 225;
					break;
				case ProfessionLevels.Artisan:
					Max = 300;
					break;
			}
		}
コード例 #6
0
        public Profession(ProfessionLevels t, int i, ushort cur, ushort ind) : base(cur, ind)
        {
            level = t;
            id    = i;
            switch (level)
            {
            case ProfessionLevels.Apprentice:
                Current = 15;
                Max     = 75;
                break;

            case ProfessionLevels.Journeyman:
                Max = 150;
                break;

            case ProfessionLevels.Expert:
                Max = 225;
                break;

            case ProfessionLevels.Artisan:
                Max = 300;
                break;
            }
        }
コード例 #7
0
ファイル: Profession.cs プロジェクト: karliky/wowwow
		public override void Deserialize( GenericReader gr, int ind, bool fake )
		{
			base.Deserialize( gr, ind, true );
			int version = gr.ReadInt();
			id = gr.ReadInt();
			level = (ProfessionLevels)gr.ReadShort();			
		//	castingTime = gr.ReadInt();	
		//	coolDown = gr.ReadInt();	
		}