• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# GS.GameNPC类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中DOL.GS.GameNPC的典型用法代码示例。如果您正苦于以下问题:C# GameNPC类的具体用法?C# GameNPC怎么用?C# GameNPC使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



GameNPC类属于DOL.GS命名空间,在下文中一共展示了GameNPC类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CreateMoneyTask

		public void CreateMoneyTask()
		{
			GamePlayer player = CreateMockGamePlayer();

			GameMerchant merchant = new GameMerchant();
			merchant.Name = "Tester";
			merchant.Realm = eRealm.Albion;
			Console.WriteLine(player.Name);

			if (MoneyTask.CheckAvailability(player, merchant))
			{
				if (MoneyTask.BuildTask(player, merchant))
				{
					MoneyTask task = (MoneyTask)player.Task;


					Assert.IsNotNull(task);
					Console.WriteLine("XP" + task.RewardXP);
					Console.WriteLine("Item:" + task.ItemName);
					Console.WriteLine("Item:" + task.Name);
					Console.WriteLine("Item:" + task.Description);

					// Check Notify Event handling
					InventoryItem item = GameInventoryItem.Create(new ItemTemplate());
					item.Name = task.ItemName;

					GameNPC npc = new GameNPC();
					npc.Name = task.RecieverName;
					task.Notify(GamePlayerEvent.GiveItem, player, new GiveItemEventArgs(player, npc, item));

					if (player.Task.TaskActive || player.Task == null)
						Assert.Fail("Task did not finished proper in Notify");
				}
			}
		}
开发者ID:dudemanvox,项目名称:Dawn-of-Light-Server,代码行数:35,代码来源:MoneyTaskTest.cs


示例2: ScriptLoaded

        public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
        {
            if (!ServerProperties.Properties.LOAD_EXAMPLES)
                return;

            #region defineNPCs

            GameNPC[] npcs = WorldMgr.GetNPCsByName("Sir Quait", eRealm.Albion);
            npcs = WorldMgr.GetNPCsByName("Sir Quait", (eRealm)1);
            GameNPC SirQuait = null;
            if (npcs.Length == 0)
            {
                SirQuait = new DOL.GS.GameNPC();
                SirQuait.Model = 40;
                SirQuait.Name = "Sir Quait";
                if (log.IsWarnEnabled)
                    log.Warn("Could not find " + SirQuait.Name + ", creating ...");
                SirQuait.Realm = eRealm.Albion;
                SirQuait.CurrentRegionID = 1;
                SirQuait.Size = 50;
                SirQuait.Level = 10;
                SirQuait.MaxSpeedBase = 100;
                SirQuait.Faction = FactionMgr.GetFactionByID(0);
                SirQuait.X = 531971;
                SirQuait.Y = 478955;
                SirQuait.Z = 0;
                SirQuait.Heading = 3570;
                SirQuait.RespawnInterval = 0;
                SirQuait.BodyType = 0;

                StandardMobBrain brain = new StandardMobBrain();
                brain.AggroLevel = 0;
                brain.AggroRange = 0;
                SirQuait.SetOwnBrain(brain);

                SirQuait.AddToWorld();
            }
            else
            {
                SirQuait = npcs[0];
            }

            #endregion

            #region defineBehaviours

            BaseBehaviour b = new BaseBehaviour(SirQuait);
            MessageAction a = new MessageAction(SirQuait,"This is just a simple test bahaviour.",eTextType.Emote);
            b.AddAction(a);
            InteractTrigger t = new InteractTrigger(SirQuait,b.NotifyHandler,SirQuait);
            b.AddTrigger(t);

            // store the behaviour in a list so it won't be garbage collected
            behaviours.Add(b);

            #endregion

            log.Info("Simple Test Behaviour added");
        }
开发者ID:mynew4,项目名称:DAoC,代码行数:59,代码来源:TestBehaviour.cs


示例3: CreateKillTask

        public void CreateKillTask()
        {
            GamePlayer player = CreateMockGamePlayer();
            player.Level=5;
            player.AddToWorld();

            // Trainer for taks
            GameTrainer trainer = new GameTrainer();
            trainer.Name ="Tester";

            Console.WriteLine(player.Name);

            // player must have trainer selected when task given.
            player.TargetObject = trainer;

            // mob for task
            if (KillTask.BuildTask(player,trainer))
            {
                KillTask task =(KillTask) player.Task;

                Assert.IsNotNull(task);
                Assert.IsTrue(task.TaskActive);

                Console.WriteLine("Mob:"+ task.MobName);
                Console.WriteLine("Item:"+ task.ItemName);
                Console.WriteLine(""+ task.Description);

                // Check Notify Event handling
                InventoryItem item = GameInventoryItem.Create<ItemTemplate>(new ItemTemplate());
                item.Name = task.ItemName;

                GameNPC mob = new GameNPC();
                mob.Name = task.MobName;
                mob.X = player.X;
                mob.Y = player.Y;
                mob.Z = player.Z;
                mob.Level = player.Level;
                mob.CurrentRegionID = player.CurrentRegionID;
                mob.AddToWorld();

                // First we kill mob
                mob.XPGainers.Add(player,1.0F);
                task.Notify(GameNPCEvent.EnemyKilled,player,new EnemyKilledEventArgs(mob));

                // arificial pickup Item
                player.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, item);

                // Check item in Inventory
                if (player.Inventory.GetFirstItemByName(task.ItemName,eInventorySlot.FirstBackpack,eInventorySlot.LastBackpack) != null)
                    Assert.Fail("Player didn't recieve task item.");

                // Now give item tro trainer
                task.Notify(GamePlayerEvent.GiveItem,player,new GiveItemEventArgs(player,trainer,item));

                if (player.Task.TaskActive || player.Task==null)
                    Assert.Fail("Task did not finished proper in Notify");
            }
        }
开发者ID:mynew4,项目名称:DAoC,代码行数:58,代码来源:KillTaskTest.cs


示例4: AddRemoveObjects

        public void AddRemoveObjects()
        {
            const int count = 30000;
            GameNPC[] mobs = new GameNPC[count];

            Console.Out.WriteLine("[{0}] init {1} mobs", id, count);
            // init mobs
            for (int i = 0; i < count; i++)
            {
                GameNPC mob = mobs[i] = new GameNPC();
                Assert.IsTrue(mob.ObjectID == -1, "mob {0} oid={1}, should be -1", i, mob.ObjectID);
                Assert.IsFalse(mob.ObjectState == GameObject.eObjectState.Active, "mob {0} state={1}, should be not Active", i, mob.ObjectState);
                mob.Name = "test mob " + i;
                mob.CurrentRegion = m_reg;
                m_reg.PreAllocateRegionSpace(1953);
            }

            for (int x = 10; x > 0; x--)
            {
                Console.Out.WriteLine("[{0}] loop {1} add mobs", id, count-x);
                // add mobs
                for (int i = 0; i <= count-x; i++)
                {
            //					Console.Out.WriteLine("add "+i);
                    GameNPC mob = mobs[i];
                    Assert.IsTrue(mob.AddToWorld(), "failed to add {0} to the world", mob.Name);
                    Assert.IsTrue(mob.ObjectID > 0 && mob.ObjectID <= DOL.GS.ServerProperties.Properties.REGION_MAX_OBJECTS, "{0} oid={1}", mob.Name, mob.ObjectID);
                }

                for (int i = count-x; i >= 0; i--)
                {
            //					Console.Out.WriteLine("check "+i);
                    GameNPC mob = mobs[i];
                    GameNPC regMob = (GameNPC)m_reg.GetObject((ushort)mob.ObjectID);
                    Assert.AreSame(mob, regMob, "expected to read '{0}' oid={1} but read '{2}' oid={3}", mob.Name, mob.ObjectID, regMob==null?"null":regMob.Name, regMob==null?"null":regMob.ObjectID.ToString());
                }

                Console.Out.WriteLine("[{0}] loop {1} remove mobs", id, count-x);
                // remove mobs
                for (int i = count-x; i >= 0; i--)
                {
            //					Console.Out.WriteLine("remove "+i);
                    GameNPC mob = mobs[i];
                    int oid = mob.ObjectID;
                    Assert.IsTrue(mob.RemoveFromWorld(), "failed to remove {0}", mob.Name);
                    Assert.IsTrue(mob.ObjectID == -1, "{0}: oid is not -1 (oid={1})", mob.Name, mob.ObjectID);
                    Assert.IsFalse(mob.ObjectState == GameObject.eObjectState.Active, "{0} is still active after remove", mob.Name);
                    GameNPC regMob = (GameNPC)m_reg.GetObject((ushort)oid);
                    Assert.IsNull(regMob, "{0} was removed from the region but oid {1} is still used by {2}", mob.Name, oid, regMob==null?"null":regMob.Name);
                }
            }
        }
开发者ID:mynew4,项目名称:DAoC,代码行数:52,代码来源:RegionOidAllocation.cs


示例5: AddObject

		[Test] public void AddObject()
		{
			Region region = WorldMgr.GetRegion(1);
			GameObject obj = new GameNPC();
			obj.Name="TestObject";
			obj.X = 400000;
			obj.Y = 200000;
			obj.Z = 2000;
			obj.CurrentRegion = region;

			obj.AddToWorld();

			if (obj.ObjectID<0)
				Assert.Fail("Failed to add object to Region. ObjectId < 0");

			Assert.AreEqual(region.GetObject((ushort)obj.ObjectID),obj);
		}
开发者ID:boscorillium,项目名称:dol,代码行数:17,代码来源:RegionTest.cs


示例6: TestLootGenerator

        public void TestLootGenerator()
        {
            GameNPC mob = new GameNPC();
            mob.Level = 6;
            mob.Name="impling";

            for (int i=0;i< 15; i++)
            {
                Console.WriteLine("Loot "+i);
                ItemTemplate[] loot = LootMgr.GetLoot(mob, null);
                foreach (ItemTemplate item in loot)
                {
                    Console.WriteLine(mob.Name+" drops "+item.Name);
                }
            }

            Console.WriteLine("Drops finished");
        }
开发者ID:mynew4,项目名称:DOLSharp,代码行数:18,代码来源:LootMgrTest.cs


示例7: StartSpell

		/// <summary>
		/// called when spell effect has to be started and applied to targets
		/// </summary>
		public override bool StartSpell(GameLiving target)
		{
			if (m_charmedNpc == null)
				m_charmedNpc = target as GameNPC; // save target on first start
			else
				target = m_charmedNpc; // reuse for pulsing spells

			if (target == null) return false;
			if (Util.Chance(CalculateSpellResistChance(target)))
			{
				OnSpellResisted(target);
			}
			else
			{
				ApplyEffectOnTarget(target, 1);
			}

			return true;
		}
开发者ID:boscorillium,项目名称:dol,代码行数:22,代码来源:CharmSpellHandler.cs


示例8: AccountVault

        /// <summary>
        /// An account vault that masquerades as a house vault to the game client
        /// </summary>
        /// <param name="player">Player who owns the vault</param>
        /// <param name="vaultNPC">NPC controlling the interaction between player and vault</param>
        /// <param name="vaultOwner">ID of vault owner (can be anything unique, if it's the account name then all toons on account can access the items)</param>
        /// <param name="vaultNumber">Valid vault IDs are 0-3</param>
        /// <param name="dummyTemplate">An ItemTemplate to satisfy the base class's constructor</param>
        public AccountVault(GamePlayer player, GameNPC vaultNPC, string vaultOwner, int vaultNumber, ItemTemplate dummyTemplate)
            : base(dummyTemplate, vaultNumber)
        {
            m_player = player;
            m_vaultNPC = vaultNPC;
            m_vaultOwner = vaultOwner;
            m_vaultNumber = vaultNumber;

            DBHouse dbh = new DBHouse();
            //was allowsave = false but uhh i replaced with allowadd = false
            dbh.AllowAdd = false;
            dbh.GuildHouse = false;
            dbh.HouseNumber = player.ObjectID;
            dbh.Name = player.Name + "'s House";
            dbh.OwnerID = player.DBCharacter.ObjectId;
            dbh.RegionID = player.CurrentRegionID;

            CurrentHouse = new House(dbh);
        }
开发者ID:mynew4,项目名称:DAoC,代码行数:27,代码来源:AccountVaultKeeper.cs


示例9: LockRelic

        public static bool LockRelic()
        {
            //make sure the relic exists before you lock it!
            if (Relic == null)
                return false;

            LockedEffect = new GameNPC();
            LockedEffect.Model = 1583;
            LockedEffect.Name = "LOCKED_RELIC";
            LockedEffect.X = Relic.X;
            LockedEffect.Y = Relic.Y;
            LockedEffect.Z = Relic.Z;
            LockedEffect.Heading = Relic.Heading;
            LockedEffect.CurrentRegionID = Relic.CurrentRegionID;
            LockedEffect.Flags = GameNPC.eFlags.CANTTARGET;
            LockedEffect.AddToWorld();

            return true;
        }
开发者ID:mynew4,项目名称:DAoC,代码行数:19,代码来源:BaseProtector.cs


示例10: GenerateLoot

		/// <summary>
        /// Generate loot for given mob
		/// </summary>
		/// <param name="mob"></param>
		/// <param name="killer"></param>
		/// <returns></returns>
		public override LootList GenerateLoot(GameNPC mob, GameObject killer)
		{
			LootList loot = base.GenerateLoot(mob, killer);

			int lvl = mob.Level + 1;
			if (lvl < 1) lvl = 1;
			int minLoot = 2 + ((lvl * lvl * lvl) >> 3);

			long moneyCount = minLoot + Util.Random(minLoot >> 1);
			moneyCount = (long)((double)moneyCount * ServerProperties.Properties.MONEY_DROP);

			ItemTemplate money = new ItemTemplate();
			money.Model = 488;
			money.Name = "bag of coins";
			money.Level = 0;

			money.Price = moneyCount;
			
			loot.AddFixed(money, 1);
			return loot;
		}
开发者ID:mynew4,项目名称:DOLSharp,代码行数:27,代码来源:LootGeneratorMoney.cs


示例11: GenerateLoot

		/// <summary>
        /// Generate loot for given mob
		/// </summary>
		/// <param name="mob"></param>
		/// <param name="killer"></param>
		/// <returns></returns>
		public override LootList GenerateLoot(GameNPC mob, GameObject killer)
		{
			LootList loot = base.GenerateLoot(mob, killer);
			
			try
			{
				GamePlayer player = killer as GamePlayer;
				if (killer is GameNPC && ((GameNPC)killer).Brain is IControlledBrain)
					player = ((ControlledNpcBrain)((GameNPC)killer).Brain).GetPlayerOwner();
				if (player == null)
					return loot;			
			
				
				ItemTemplate atlanteanGlass = new ItemTemplate(m_atlanteanglass);

				int killedcon = (int)player.GetConLevel(mob)+3;
				
				if(killedcon <= 0)
					return loot;
								
				int lvl = mob.Level + 1;
				if (lvl < 1) lvl = 1;
				int maxcount = 1;
				
				//Switch pack size
				if (lvl > 0 && lvl < 10) 
				{
					//Single AtlanteanGlass
					maxcount = (int)Math.Floor((double)(lvl/2))+1;
				}
				else if (lvl >= 10 && lvl < 20)
				{
					//Double
					atlanteanGlass.PackSize = 2;
					maxcount = (int)Math.Floor((double)((lvl-10)/2))+1;
				}
				else if (lvl >= 20 && lvl < 30)
				{
					//Triple
					atlanteanGlass.PackSize = 3;
					maxcount = (int)Math.Floor((double)((lvl-20)/2))+1;
					
				}
				else if (lvl >=30 && lvl < 40) 
				{
					//Quad
					atlanteanGlass.PackSize = 4;
					maxcount = (int)Math.Floor((double)((lvl-30)/2))+1;
				}
				else if (lvl >= 40 && lvl < 50)
				{
					//Quint
					atlanteanGlass.PackSize = 5;
					maxcount = (int)Math.Floor((double)((lvl-40)/2))+1;
				}
				else 
				{
					//Cache (x10)
					atlanteanGlass.PackSize = 10;
					maxcount = (int)Math.Round((double)(lvl/10));
				}
				
				if (!mob.Name.ToLower().Equals(mob.Name))
				{
					//Named mob, more cash !
					maxcount = (int)Math.Round(maxcount*ServerProperties.Properties.LOOTGENERATOR_ATLANTEANGLASS_NAMED_COUNT);
				}
				
				if(maxcount > 0 && Util.Chance(ServerProperties.Properties.LOOTGENERATOR_ATLANTEANGLASS_BASE_CHANCE+Math.Max(10, killedcon)))
				{
					loot.AddFixed(atlanteanGlass, maxcount);
				}
					
			}
			catch
			{
				return loot;
			}
			
			return loot;
		}
开发者ID:mynew4,项目名称:DAoC,代码行数:87,代码来源:LootGeneratorAtlanteanGlass.cs


示例12: CastingBehaviour

 public CastingBehaviour(GameNPC body)
 {
     Body = body;
 }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:4,代码来源:CastingBehaviour.cs


示例13: Copy

		/// <summary>
		/// Create a copy of the GameNPC
		/// </summary>
		/// <param name="copyTarget">A GameNPC to copy this GameNPC to (can be null)</param>
		/// <returns>The GameNPC this GameNPC was copied to</returns>
		public GameNPC Copy( GameNPC copyTarget )
		{
			if ( copyTarget == null )
				copyTarget = new GameNPC();

			copyTarget.TranslationId = TranslationId;
			copyTarget.BlockChance = BlockChance;
			copyTarget.BodyType = BodyType;
			copyTarget.CanUseLefthandedWeapon = CanUseLefthandedWeapon;
			copyTarget.Charisma = Charisma;
			copyTarget.Constitution = Constitution;
			copyTarget.CurrentRegion = CurrentRegion;
			copyTarget.Dexterity = Dexterity;
			copyTarget.Empathy = Empathy;
			copyTarget.Endurance = Endurance;
			copyTarget.EquipmentTemplateID = EquipmentTemplateID;
			copyTarget.EvadeChance = EvadeChance;
			copyTarget.Faction = Faction;
			copyTarget.Flags = Flags;
			copyTarget.GuildName = GuildName;
			copyTarget.ExamineArticle = ExamineArticle;
			copyTarget.MessageArticle = MessageArticle;
			copyTarget.Heading = Heading;
			copyTarget.Intelligence = Intelligence;
			copyTarget.IsCloakHoodUp = IsCloakHoodUp;
			copyTarget.IsCloakInvisible = IsCloakInvisible;
			copyTarget.IsHelmInvisible = IsHelmInvisible;
			copyTarget.LeftHandSwingChance = LeftHandSwingChance;
			copyTarget.Level = Level;
			copyTarget.LoadedFromScript = LoadedFromScript;
			copyTarget.MaxSpeedBase = MaxSpeedBase;
			copyTarget.MeleeDamageType = MeleeDamageType;
			copyTarget.Model = Model;
			copyTarget.Name = Name;
			copyTarget.Suffix = Suffix;
			copyTarget.NPCTemplate = NPCTemplate;
			copyTarget.ParryChance = ParryChance;
			copyTarget.PathID = PathID;
			copyTarget.PathingNormalSpeed = PathingNormalSpeed;
			copyTarget.Quickness = Quickness;
			copyTarget.Piety = Piety;
			copyTarget.Race = Race;
			copyTarget.Realm = Realm;
			copyTarget.RespawnInterval = RespawnInterval;
			copyTarget.RoamingRange = RoamingRange;
			copyTarget.Size = Size;
			copyTarget.SaveInDB = SaveInDB;
			copyTarget.Strength = Strength;
			copyTarget.TetherRange = TetherRange;
			copyTarget.MaxDistance = MaxDistance;
			copyTarget.X = X;
			copyTarget.Y = Y;
			copyTarget.Z = Z;
			copyTarget.OwnerID = OwnerID;
			copyTarget.PackageID = PackageID;

			if ( Abilities != null && Abilities.Count > 0 )
			{
				foreach (Ability targetAbility in Abilities.Values)
				{
					if ( targetAbility != null )
						copyTarget.AddAbility( targetAbility );
				}
			}

			ABrain brain = null;
			foreach ( Assembly assembly in AppDomain.CurrentDomain.GetAssemblies() )
			{
				brain = (ABrain)assembly.CreateInstance( Brain.GetType().FullName, true );
				if ( brain != null )
					break;
			}

			if ( brain == null )
			{
				log.Warn( "GameNPC.Copy():  Unable to create brain:  " + Brain.GetType().FullName + ", using StandardMobBrain." );
				brain = new StandardMobBrain();
			}

			StandardMobBrain newBrainSMB = brain as StandardMobBrain;
			StandardMobBrain thisBrainSMB = this.Brain as StandardMobBrain;

			if ( newBrainSMB != null && thisBrainSMB != null )
			{
				newBrainSMB.AggroLevel = thisBrainSMB.AggroLevel;
				newBrainSMB.AggroRange = thisBrainSMB.AggroRange;
			}

			copyTarget.SetOwnBrain( brain );

			if ( Inventory != null && Inventory.AllItems.Count > 0 )
			{
				GameNpcInventoryTemplate inventoryTemplate = Inventory as GameNpcInventoryTemplate;

				if( inventoryTemplate != null )
//.........这里部分代码省略.........
开发者ID:dudemanvox,项目名称:Dawn-of-Light-Server,代码行数:101,代码来源:GameNPC.cs


示例14: IsFriend

		/// <summary>
		/// Whether this NPC is a friend or not.
		/// </summary>
		/// <param name="npc">The NPC that is checked against.</param>
		/// <returns></returns>
		public virtual bool IsFriend(GameNPC npc)
		{
			if (Faction == null || npc.Faction == null)
				return false;
			return (npc.Faction == Faction || Faction.FriendFactions.Contains(npc.Faction));
		}
开发者ID:dudemanvox,项目名称:Dawn-of-Light-Server,代码行数:11,代码来源:GameNPC.cs


示例15: GetLoot

		/// <summary>
		/// Returns the loot for the given Mob
		/// </summary>		
		/// <param name="mob"></param>
		/// <param name="killer"></param>
		/// <returns></returns>
		public static ItemTemplate[] GetLoot(GameNPC mob, GameObject killer)
		{
			LootList lootList = null;
			IList generators = GetLootGenerators(mob);
			foreach (ILootGenerator generator in generators)
			{
				try
				{
					if (lootList == null)
						lootList = generator.GenerateLoot(mob, killer);
					else
						lootList.AddAll(generator.GenerateLoot(mob, killer));
				}
				catch (Exception e)
				{
					if (log.IsErrorEnabled)
						log.Error("GetLoot", e);
				}
			}
			if (lootList != null)
				return lootList.GetLoot();
			else
				return new ItemTemplate[0];
		}
开发者ID:mynew4,项目名称:DAoC,代码行数:30,代码来源:LootMgr.cs


示例16: SpawnTimedAdd

        /// <summary>
        /// Create an add from the specified template.
        /// </summary>
        /// <param name="templateID"></param>
        /// <param name="level"></param>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <param name="uptime"></param>
        /// <returns></returns>
        protected GameNPC SpawnTimedAdd(int templateID, int level, int x, int y, int uptime, bool isRetriever)
        {
            GameNPC add = null;

            try
            {
                if (m_addTemplate == null || m_addTemplate.TemplateId != templateID)
                {
                    m_addTemplate = NpcTemplateMgr.GetTemplate(templateID);
                }

                // Create add from template.
                // The add will automatically despawn after 30 seconds.

                if (m_addTemplate != null)
                {
                    add = new GameNPC(m_addTemplate);

                    if (isRetriever)
                    {
                        add.SetOwnBrain(new RetrieverMobBrain());
                    }
                    add.CurrentRegion = this.CurrentRegion;
                    add.Heading = (ushort)(Util.Random(0, 4095));
                    add.Realm = 0;
                    add.X = x;
                    add.Y = y;
                    add.Z = Z;
                    add.CurrentSpeed = 0;
                    add.Level = (byte)level;
                    add.RespawnInterval = -1;
                    add.AddToWorld();
                    new DespawnTimer(this, add, uptime * 1000);
                }
            }
            catch
            {
                log.Warn(String.Format("Unable to get template for {0}", Name));
            }
            return add;
        }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:50,代码来源:GameDragon.cs


示例17: RestoreHeadingAction

			/// <summary>
			/// Creates a new TurnBackAction
			/// </summary>
			/// <param name="actionSource">The source of action</param>
			public RestoreHeadingAction(GameNPC actionSource)
				: base(actionSource)
			{
				m_oldHeading = actionSource.Heading;
				m_oldPosition = new Point3D(actionSource);
			}
开发者ID:dudemanvox,项目名称:Dawn-of-Light-Server,代码行数:10,代码来源:GameNPC.cs


示例18: Refresh

		public virtual void Refresh(GameNPC mob)
		{
		}
开发者ID:mynew4,项目名称:DAoC,代码行数:3,代码来源:LootGeneratorBase.cs


示例19: GenerateLoot

		/// <summary>
		/// Generate loot for given mob
		/// </summary>
		/// <param name="mob"></param>
		/// <param name="killer"></param>
		/// <returns></returns>
		public virtual LootList GenerateLoot(GameNPC mob, GameObject killer)
		{
			LootList loot = new LootList();
			return loot;
		}
开发者ID:mynew4,项目名称:DAoC,代码行数:11,代码来源:LootGeneratorBase.cs


示例20: OnRetrieverArrived

        /// <summary>
        /// Invoked when retriever type mob has reached its target location.
        /// </summary>
        /// <param name="sender">The retriever mob.</param>
        public override void OnRetrieverArrived(GameNPC sender)
        {
            base.OnRetrieverArrived(sender);
            if (sender == null || sender == this) return;

            // Spawn nasty adds.

            if (m_retrieverList.Contains(sender))
                SpawnDrakulvs(Util.Random(7, 10), sender.X, sender.Y);
        }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:14,代码来源:Gjalpinulva.cs



注:本文中的DOL.GS.GameNPC类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# GS.GameObject类代码示例发布时间:2022-05-24
下一篇:
C# GS.GameClient类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap