本文整理汇总了C#中IArea.RegisterPlayerEnter方法的典型用法代码示例。如果您正苦于以下问题:C# IArea.RegisterPlayerEnter方法的具体用法?C# IArea.RegisterPlayerEnter怎么用?C# IArea.RegisterPlayerEnter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IArea
的用法示例。
在下文中一共展示了IArea.RegisterPlayerEnter方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ScriptLoaded
//.........这里部分代码省略.........
}
//of Mental Acuity Legs
SorcerorEpicLegs = GameServer.Database.FindObjectByKey<ItemTemplate>("SorcerorEpicLegs");
if (SorcerorEpicLegs == null)
{
if (log.IsWarnEnabled)
log.Warn("Could not find Sorceror Epic Legs , creating it ...");
item = new ItemTemplate();
item.Id_nb = "SorcerorEpicLegs";
item.Name = "Pants of Mental Acuity";
item.Level = 50;
item.Item_Type = 27;
item.Model = 140;
item.IsDropable = true;
item.IsPickable = true;
item.DPS_AF = 50;
item.SPD_ABS = 0;
item.Object_Type = 32;
item.Quality = 100;
item.Weight = 22;
item.Bonus = 35;
item.MaxCondition = 50000;
item.MaxDurability = 50000;
item.Condition = 50000;
item.Durability = 50000;
item.Bonus1 = 4;
item.Bonus1Type = (int) eProperty.Focus_Mind;
item.Bonus2 = 19;
item.Bonus2Type = (int) eStat.CON;
item.Bonus3 = 8;
item.Bonus3Type = (int) eResist.Body;
item.Bonus4 = 8;
item.Bonus4Type = (int) eResist.Spirit;
GameServer.Database.AddObject(item);
SorcerorEpicLegs = item;
}
//of Mental Acuity Sleeves
SorcerorEpicArms = GameServer.Database.FindObjectByKey<ItemTemplate>("SorcerorEpicArms");
if (SorcerorEpicArms == null)
{
if (log.IsWarnEnabled)
log.Warn("Could not find Sorceror Epic Arms , creating it ...");
item = new ItemTemplate();
item.Id_nb = "SorcerorEpicArms";
item.Name = "Sleeves of Mental Acuity";
item.Level = 50;
item.Item_Type = 28;
item.Model = 141;
item.IsDropable = true;
item.IsPickable = true;
item.DPS_AF = 50;
item.SPD_ABS = 0;
item.Object_Type = 32;
item.Quality = 100;
item.Weight = 22;
item.Bonus = 35;
item.MaxCondition = 50000;
item.MaxDurability = 50000;
item.Condition = 50000;
item.Durability = 50000;
item.Bonus1 = 4;
item.Bonus1Type = (int) eProperty.Focus_Body;
item.Bonus2 = 16;
item.Bonus2Type = (int) eStat.DEX;
item.Bonus3 = 18;
item.Bonus3Type = (int) eStat.INT;
GameServer.Database.AddObject(item);
SorcerorEpicArms = item;
}
//Item Descriptions End
#endregion
morganaArea = WorldMgr.GetRegion(Morgana.CurrentRegionID).AddArea(new Area.Circle(null, Morgana.X, Morgana.Y, 0, 1000));
morganaArea.RegisterPlayerEnter(new DOLEventHandler(PlayerEnterMorganaArea));
GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest));
GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest));
GameEventMgr.AddHandler(Ferowl, GameObjectEvent.Interact, new DOLEventHandler(TalkToFerowl));
GameEventMgr.AddHandler(Ferowl, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToFerowl));
/* Now we bring to Ferowl the possibility to give this quest to players */
Ferowl.AddQuestToGive(typeof (Academy_50));
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" initialized");
}
示例2: ScriptLoaded
public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
{
if (!ServerProperties.Properties.LOAD_QUESTS)
return;
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" initializing ...");
#region defineNPCS
GameNPC[] npcs = WorldMgr.GetNPCsByName("Lady Grynoch", eRealm.Albion);
if (npcs.Length == 0)
{
LadyGrynoch = new GameNPC();
LadyGrynoch.Model = 5;
LadyGrynoch.Name = "Lady Grynoch";
if (log.IsWarnEnabled)
log.Warn("Could not find " + LadyGrynoch.Name + ", creating her ...");
//k109: My preference, no guildname for quest NPCs. Uncomment if you like that...
//LadyGrynoch.GuildName = "Part of " + questTitle + " Quest";
LadyGrynoch.Realm = eRealm.Albion;
LadyGrynoch.CurrentRegionID = 1;
GameNpcInventoryTemplate template = new GameNpcInventoryTemplate();
template.AddNPCEquipment(eInventorySlot.TorsoArmor, 58); //Slot 25
LadyGrynoch.Inventory = template.CloseTemplate();
LadyGrynoch.SwitchWeapon(GameLiving.eActiveWeaponSlot.Standard);
LadyGrynoch.Size = 51;
LadyGrynoch.Level = 38;
LadyGrynoch.X = 559698;
LadyGrynoch.Y = 513578;
LadyGrynoch.Z = 2428;
LadyGrynoch.Heading = 2742;
if (SAVE_INTO_DATABASE)
LadyGrynoch.SaveIntoDatabase();
LadyGrynoch.AddToWorld();
}
else
LadyGrynoch = npcs[0];
#endregion
#region defineAreas
Demons_Breach_Area = WorldMgr.GetRegion(Demons_Breach.RegionID).AddArea(new Area.Circle("", Demons_Breach.X, Demons_Breach.Y, Demons_Breach.Z, 200));
Demons_Breach_Area.RegisterPlayerEnter(new DOLEventHandler(PlayerEnterDemonBreachArea));
#endregion
GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest));
GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest));
GameEventMgr.AddHandler(LadyGrynoch, GameLivingEvent.Interact, new DOLEventHandler(TalkToLadyGrynoch));
GameEventMgr.AddHandler(LadyGrynoch, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToLadyGrynoch));
LadyGrynoch.AddQuestToGive(typeof(ToReachTheBreach));
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" initialized");
}
示例3: ScriptLoaded
//.........这里部分代码省略.........
daringstuddedleggings_alb.Charges1 = 0;
//You don't have to store the created item in the db if you don't want,
//it will be recreated each time it is not found, just comment the following
//line if you rather not modify your database
GameServer.Database.AddObject(daringstuddedleggings_alb);
}
daringstuddedsleeves_alb = GameServer.Database.FindObjectByKey<ItemTemplate>("daringstuddedsleeves_alb");
if (daringstuddedsleeves_alb == null)
{
daringstuddedsleeves_alb = new ItemTemplate();
daringstuddedsleeves_alb.Name = "Daring Studded Sleeves";
if (log.IsWarnEnabled)
log.Warn("Could not find " + daringstuddedsleeves_alb.Name + ", creating it ...");
daringstuddedsleeves_alb.Level = 5;
daringstuddedsleeves_alb.Weight = 36;
daringstuddedsleeves_alb.Model = 83;
daringstuddedsleeves_alb.Object_Type = 34;
daringstuddedsleeves_alb.Item_Type = 28;
daringstuddedsleeves_alb.Id_nb = "daringstuddedsleeves_alb";
daringstuddedsleeves_alb.Hand = 0;
daringstuddedsleeves_alb.Price = 0;
daringstuddedsleeves_alb.IsPickable = true;
daringstuddedsleeves_alb.IsDropable = true;
daringstuddedsleeves_alb.IsTradable = true;
daringstuddedsleeves_alb.CanDropAsLoot = false;
daringstuddedsleeves_alb.Color = 0;
daringstuddedsleeves_alb.Bonus = 0; // default bonus
daringstuddedsleeves_alb.Bonus1 = 4;
daringstuddedsleeves_alb.Bonus1Type = (int)1;
daringstuddedsleeves_alb.Bonus2 = 0;
daringstuddedsleeves_alb.Bonus2Type = (int)0;
daringstuddedsleeves_alb.Bonus3 = 0;
daringstuddedsleeves_alb.Bonus3Type = (int)0;
daringstuddedsleeves_alb.Bonus4 = 0;
daringstuddedsleeves_alb.Bonus4Type = (int)0;
daringstuddedsleeves_alb.Bonus5 = 0;
daringstuddedsleeves_alb.Bonus5Type = (int)0;
daringstuddedsleeves_alb.Bonus6 = 0;
daringstuddedsleeves_alb.Bonus6Type = (int)0;
daringstuddedsleeves_alb.Bonus7 = 0;
daringstuddedsleeves_alb.Bonus7Type = (int)0;
daringstuddedsleeves_alb.Bonus8 = 0;
daringstuddedsleeves_alb.Bonus8Type = (int)0;
daringstuddedsleeves_alb.Bonus9 = 0;
daringstuddedsleeves_alb.Bonus9Type = (int)0;
daringstuddedsleeves_alb.Bonus10 = 0;
daringstuddedsleeves_alb.Bonus10Type = (int)0;
daringstuddedsleeves_alb.ExtraBonus = 0;
daringstuddedsleeves_alb.ExtraBonusType = (int)0;
daringstuddedsleeves_alb.Effect = 0;
daringstuddedsleeves_alb.DPS_AF = 12;
daringstuddedsleeves_alb.Charges = 0;
daringstuddedsleeves_alb.MaxCharges = 0;
daringstuddedsleeves_alb.SpellID = 0;
daringstuddedsleeves_alb.ProcSpellID = 0;
daringstuddedsleeves_alb.SPD_ABS = 19;
daringstuddedsleeves_alb.Realm = 0;
daringstuddedsleeves_alb.MaxCount = 1;
daringstuddedsleeves_alb.PackSize = 1;
daringstuddedsleeves_alb.Extension = 0;
daringstuddedsleeves_alb.Quality =89;
daringstuddedsleeves_alb.Condition = 50000;
daringstuddedsleeves_alb.MaxCondition = 50000;
daringstuddedsleeves_alb.Durability = 50000;
daringstuddedsleeves_alb.MaxDurability = 50000;
daringstuddedsleeves_alb.PoisonCharges = 0;
daringstuddedsleeves_alb.PoisonMaxCharges = 0;
daringstuddedsleeves_alb.PoisonSpellID = 0;
daringstuddedsleeves_alb.ProcSpellID1 = 0;
daringstuddedsleeves_alb.SpellID1 = 0;
daringstuddedsleeves_alb.MaxCharges1 = 0;
daringstuddedsleeves_alb.Charges1 = 0;
//You don't have to store the created item in the db if you don't want,
//it will be recreated each time it is not found, just comment the following
//line if you rather not modify your database
GameServer.Database.AddObject(daringstuddedsleeves_alb);
}
#endregion
#region defineAreas
Albion_Statue_Area = WorldMgr.GetRegion(Albion_Statue.RegionID).AddArea(new Area.Circle("", Albion_Statue.X, Albion_Statue.Y, Albion_Statue.Z, 500));
Albion_Statue_Area.RegisterPlayerEnter(new DOLEventHandler(PlayerEnterStatueArea));
#endregion
GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest));
GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest));
GameEventMgr.AddHandler(Charles, GameLivingEvent.Interact, new DOLEventHandler(TalkToCharles));
GameEventMgr.AddHandler(Charles, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToCharles));
Charles.AddQuestToGive(typeof(childsplay));
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" initialized");
}
示例4: ScriptLoaded
//.........这里部分代码省略.........
recruitsShortSword.Price = Money.GetMoney(0, 0, 0, 2, 0);
recruitsShortSword.IsPickable = true;
recruitsShortSword.IsDropable = true;
recruitsShortSword.Color = 45; // blue metal
recruitsShortSword.Bonus = 1; // default bonus
recruitsShortSword.Bonus1 = 3;
recruitsShortSword.Bonus1Type = (int)eStat.STR;
recruitsShortSword.Bonus2 = 1;
recruitsShortSword.Bonus2Type = (int)eResist.Body;
recruitsShortSword.Quality = 100;
recruitsShortSword.Condition = 1000;
recruitsShortSword.MaxCondition = 1000;
recruitsShortSword.Durability = 1000;
recruitsShortSword.MaxDurability = 1000;
//You don't have to store the created item in the db if you don't want,
//it will be recreated each time it is not found, just comment the following
//line if you rather not modify your database
GameServer.Database.AddObject(recruitsShortSword);
}
// item db check
recruitsStaff = GameServer.Database.FindObjectByKey<ItemTemplate>("recruits_staff");
if (recruitsStaff == null)
{
recruitsStaff = new ItemTemplate();
recruitsStaff.Name = "Recruit's Staff";
if (log.IsWarnEnabled)
log.Warn("Could not find " + recruitsStaff.Name + ", creating it ...");
recruitsStaff.Level = 4;
recruitsStaff.Weight = 45;
recruitsStaff.Model = 442;
recruitsStaff.DPS_AF = 24;
recruitsStaff.SPD_ABS = 45;
recruitsStaff.Type_Damage = (int)eDamageType.Slash;
recruitsStaff.Object_Type = (int)eObjectType.Staff;
recruitsStaff.Item_Type = (int)eEquipmentItems.LEFT_HAND;
recruitsStaff.Id_nb = "recruits_staff";
recruitsStaff.Price = Money.GetMoney(0, 0, 0, 2, 0);
recruitsStaff.IsPickable = true;
recruitsStaff.IsDropable = true;
recruitsStaff.Color = 45; // blue metal
recruitsStaff.Bonus = 1; // default bonus
recruitsStaff.Bonus1 = 3;
recruitsStaff.Bonus1Type = (int)eStat.INT;
recruitsStaff.Bonus2 = 1;
recruitsStaff.Bonus2Type = (int)eResist.Crush;
recruitsStaff.Quality = 100;
recruitsStaff.Condition = 1000;
recruitsStaff.MaxCondition = 1000;
recruitsStaff.Durability = 1000;
recruitsStaff.MaxDurability = 1000;
//You don't have to store the created item in the db if you don't want,
//it will be recreated each time it is not found, just comment the following
//line if you rather not modify your database
GameServer.Database.AddObject(recruitsStaff);
}
#endregion defineItems
fairyArea = WorldMgr.GetRegion(fairyLocation.RegionID).AddArea(new Area.Circle("Fairy contamined Area", fairyLocation.X, fairyLocation.Y, 0, 1500));
fairyArea.RegisterPlayerEnter(new DOLEventHandler(PlayerEnterFairyArea));
/* Now we add some hooks to the npc we found.
* Actually, we want to know when a player interacts with him.
* So, we hook the right-click (interact) and the whisper method
* of npc and set the callback method to the "TalkToXXX"
* method. This means, the "TalkToXXX" method is called whenever
* a player right clicks on him or when he whispers to him.
*/
GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest));
GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest));
//We want to be notified whenever a player enters the world
GameEventMgr.AddHandler(GamePlayerEvent.GameEntered, new DOLEventHandler(PlayerEnterWorld));
GameEventMgr.AddHandler(masterFrederick, GameLivingEvent.Interact, new DOLEventHandler(TalkToMasterFrederick));
GameEventMgr.AddHandler(masterFrederick, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToMasterFrederick));
/* Now we bring to masterFrederick the possibility to give this quest to players */
masterFrederick.AddQuestToGive(typeof(Nuisances));
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" initialized");
}
示例5: ScriptLoaded
public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
{
if (!ServerProperties.Properties.LOAD_QUESTS)
return;
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" initializing ...");
/* First thing we do in here is to search for the NPCs inside
* the world who comes from the certain Realm. If we find a the players,
* this means we don't have to create a new one.
*
* NOTE: You can do anything you want in this method, you don't have
* to search for NPC's ... you could create a custom item, place it
* on the ground and if a player picks it up, he will get the quest!
* Just examples, do anything you like and feel comfortable with :)
*/
#region defineNPCS
GameNPC[] npcs = WorldMgr.GetNPCsByName("Farmer Asma", eRealm.Albion);
if (npcs.Length == 0)
{
farmerAsma = new GameNPC();
farmerAsma.Model = 82;
farmerAsma.Name = "Farmer Asma";
if (log.IsWarnEnabled)
log.Warn("Could not find " + farmerAsma.Name + ", creating him ...");
farmerAsma.GuildName = "Part of " + questTitle + " Quest";
farmerAsma.Realm = eRealm.Albion;
farmerAsma.CurrentRegionID = 1;
GameNpcInventoryTemplate template = new GameNpcInventoryTemplate();
template.AddNPCEquipment(eInventorySlot.TorsoArmor, 31);
template.AddNPCEquipment(eInventorySlot.Cloak, 57);
template.AddNPCEquipment(eInventorySlot.LegsArmor, 32);
template.AddNPCEquipment(eInventorySlot.ArmsArmor, 33);
farmerAsma.Inventory = template.CloseTemplate();
farmerAsma.SwitchWeapon(GameLiving.eActiveWeaponSlot.Standard);
farmerAsma.Size = 50;
farmerAsma.Level = 35;
farmerAsma.X = 563939;
farmerAsma.Y = 509234;
farmerAsma.Z = 2744 ;
farmerAsma.Heading = 21;
//You don't have to store the created mob in the db if you don't want,
//it will be recreated each time it is not found, just comment the following
//line if you rather not modify your database
if (SAVE_INTO_DATABASE)
farmerAsma.SaveIntoDatabase();
farmerAsma.AddToWorld();
}
else
farmerAsma = npcs[0];
#endregion
#region defineItems
// item db check
farmerAsmasMap = GameServer.Database.FindObjectByKey<ItemTemplate>("farmer_asma_map");
if (farmerAsmasMap == null)
{
farmerAsmasMap = new ItemTemplate();
farmerAsmasMap.Name = "Farmer Asma's Map";
if (log.IsWarnEnabled)
log.Warn("Could not find "+farmerAsmasMap.Name+", creating it ...");
farmerAsmasMap.Level = 0;
farmerAsmasMap.Weight = 1;
farmerAsmasMap.Model = 499;
farmerAsmasMap.Object_Type = (int) eObjectType.GenericItem;
farmerAsmasMap.Id_nb = "farmer_asma_map";
farmerAsmasMap.Price = 0;
farmerAsmasMap.IsPickable = false;
farmerAsmasMap.IsDropable = false;
farmerAsmasMap.Quality = 100;
farmerAsmasMap.Condition = 1000;
farmerAsmasMap.MaxCondition = 1000;
farmerAsmasMap.Durability = 1000;
farmerAsmasMap.MaxDurability = 1000;
//You don't have to store the created item in the db if you don't want,
//it will be recreated each time it is not found, just comment the following
//line if you rather not modify your database
GameServer.Database.AddObject(farmerAsmasMap);
}
#endregion
firstFieldArea = WorldMgr.GetRegion(firstField.RegionID).AddArea(new Area.Circle("First Vacant Field", firstField.X, firstField.Y, 0, 1450));
firstFieldArea.RegisterPlayerEnter(new DOLEventHandler(PlayerEnterFirstFieldArea));
secondFieldArea = WorldMgr.GetRegion(secondField.RegionID).AddArea(new Area.Circle("Second Vacant Field", secondField.X, secondField.Y, 0, 1100));
secondFieldArea.RegisterPlayerEnter(new DOLEventHandler(PlayerEnterSecondFieldArea));
thirdFieldArea = WorldMgr.GetRegion(thirdField.RegionID).AddArea(new Area.Circle("Third Vacant Field", thirdField.X, thirdField.Y, 0, 1100));
//.........这里部分代码省略.........
示例6: ScriptLoaded
public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
{
if (!ServerProperties.Properties.LOAD_QUESTS)
return;
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" initializing ...");
#region defineNPCS
// Master Gethin
GameNPC[] npcs = WorldMgr.GetNPCsByName(questGiverName, realm);
if (npcs.Length == 0)
{
questGiver = new GameNPC();
questGiver.Model = 350;
questGiver.Name = questGiverName;
if (log.IsWarnEnabled)
log.Warn("Could not find " + questGiver.Name + ", creating him ...");
//Richael.GuildName = "Part of " + questTitle + " Quest";
questGiver.Realm = realm;
questGiver.CurrentRegionID = 27;
GameNpcInventoryTemplate template = new GameNpcInventoryTemplate();
template.AddNPCEquipment(eInventorySlot.HandsArmor, 391, 0); //Slot 22
template.AddNPCEquipment(eInventorySlot.FeetArmor, 392, 0); //Slot 23
template.AddNPCEquipment(eInventorySlot.TorsoArmor, 667, 0); //Slot 25
template.AddNPCEquipment(eInventorySlot.Cloak, 678, 0); //Slot 26
template.AddNPCEquipment(eInventorySlot.LegsArmor, 389, 0); //Slot 27
template.AddNPCEquipment(eInventorySlot.ArmsArmor, 390, 0); //Slot 28
questGiver.Inventory = template.CloseTemplate();
questGiver.SwitchWeapon(GameLiving.eActiveWeaponSlot.Standard);
questGiver.Size = 50;
questGiver.Level = 65;
questGiver.X = 356932;
questGiver.Y = 363575;
questGiver.Z = 5248;
questGiver.Heading = 2912;
if (SAVE_INTO_DATABASE)
questGiver.SaveIntoDatabase();
questGiver.AddToWorld();
}
else
questGiver = npcs[0];
#endregion
#region defineAreas
targetArea = questGiver.CurrentRegion.AddArea(new Area.Circle("", flimsyX, flimsyY, flimsyZ, radius));
targetArea.RegisterPlayerEnter(new DOLEventHandler(PlayerApproachesFlimsyDummy));
#endregion
#region defineBehaviours
QuestBuilder builder = QuestMgr.getBuilder(typeof(BasicsOfCombat));
QuestBehaviour a = null;
a = builder.CreateBehaviour(questGiver, -1);
a.AddTrigger(eTriggerType.Interact, null, questGiver);
a.AddRequirement(eRequirementType.QuestPending, typeof(BasicsOfCombat), null, (eComparator)5);
a.AddRequirement(eRequirementType.QuestGivable, typeof(BasicsOfCombat), questGiver);
a.AddAction(eActionType.Talk, message1, questGiver);
AddBehaviour(a);
a = builder.CreateBehaviour(questGiver, -1);
a.AddTrigger(eTriggerType.Whisper, "ready to learn", questGiver);
a.AddRequirement(eRequirementType.QuestPending, typeof(BasicsOfCombat), null, (eComparator)5);
a.AddAction(eActionType.OfferQuest, typeof(BasicsOfCombat), "Do you want to learn about the Basics of Combat?");
AddBehaviour(a);
a = builder.CreateBehaviour(questGiver, -1);
a.AddTrigger(eTriggerType.AcceptQuest, null, typeof(BasicsOfCombat));
a.AddAction(eActionType.Talk, message2, questGiver);
a.AddAction(eActionType.GiveQuest, typeof(BasicsOfCombat), questGiver);
AddBehaviour(a);
GameNPC[] weakDummies = (GameNPC[])WorldMgr.GetObjectsByName(weakName, eRealm.None, typeof(GameTrainingDummy));
if (weakDummies != null)
{
for (int i = 0; i < weakDummies.Length; i++)
{
a = builder.CreateBehaviour(weakDummies[i], -1);
a.AddTrigger(eTriggerType.Interact, null, weakDummies[i]);
a.AddRequirement(eRequirementType.QuestStep, typeof(BasicsOfCombat), 3, eComparator.Equal);
a.AddAction(eActionType.Talk, message5, questGiver);
a.AddAction(eActionType.IncQuestStep, typeof(BasicsOfCombat), null);
AddBehaviour(a);
}
}
GameNPC[] standardDummies = (GameNPC[])WorldMgr.GetObjectsByName(standardName, eRealm.None, typeof(GameTrainingDummy));
if (standardDummies != null)
{
for (int i = 0; i < standardDummies.Length; i++)
{
a = builder.CreateBehaviour(standardDummies[i], -1);
a.AddTrigger(eTriggerType.Interact, null, standardDummies[i]);
//.........这里部分代码省略.........