本文整理汇总了C#中GamePlayer.IsDoingQuest方法的典型用法代码示例。如果您正苦于以下问题:C# GamePlayer.IsDoingQuest方法的具体用法?C# GamePlayer.IsDoingQuest怎么用?C# GamePlayer.IsDoingQuest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GamePlayer
的用法示例。
在下文中一共展示了GamePlayer.IsDoingQuest方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AbortQuestToPlayer
/// <summary>
/// Send the quest dialogue for a classic quest to the player
/// </summary>
/// <param name="questType"></param>
/// <param name="sentence"></param>
/// <param name="player"></param>
/// <param name="source"></param>
/// <returns></returns>
public static bool AbortQuestToPlayer(Type questType, string sentence, GamePlayer player,GameNPC source )
{
if (player.IsDoingQuest(questType) != null)
{
player.Out.SendQuestAbortCommand(source, QuestMgr.GetIDForQuestType(questType), sentence);
return true;
}
else
{
return false;
}
}
示例2: CheckQuestQualification
/// <summary>
/// This method checks if a player is qualified for this quest
/// </summary>
/// <returns>true if qualified, false if not</returns>
public override bool CheckQuestQualification(GamePlayer player)
{
// if the player is already doing the quest his level is no longer of relevance
if (player.IsDoingQuest(typeof(HelpSirQuait)) != null)
return true;
// Custom Code Begin
// Custom Code End
if (player.Level > maximumLevel || player.Level < minimumLevel)
return false;
// If you want restrict the quest to specific player classes you can do
// something like that
/*
if (player.CharacterClass.ID != (byte) eCharacterClass.Fighter)
{
return false;
}
*/
return true;
}
示例3: CheckPlayerAbortQuest
/* This is our callback hook that will be called when the player clicks
* on any button in the quest offer dialog. We check if he accepts or
* declines here...
*/
private static void CheckPlayerAbortQuest(GamePlayer player, byte response)
{
ClericMulgrut quest = player.IsDoingQuest(typeof (ClericMulgrut)) as ClericMulgrut;
if (quest == null)
return;
if (response == 0x00)
{
SendSystemMessage(player, "Good, no go out there and finish your work!");
}
else
{
SendSystemMessage(player, "Aborting Quest " + questTitle + ". You can start over again if you want.");
quest.AbortQuest();
}
}
示例4: CheckPlayerAcceptQuest
/* This is our callback hook that will be called when the player clicks
* on any button in the quest offer dialog. We check if he accepts or
* declines here...
*/
private static void CheckPlayerAcceptQuest(GamePlayer player, byte response)
{
// We recheck the qualification, because we don't talk to players
// who are not doing the quest.
if (Blercyn.CanGiveQuest(typeof(SearchForKnowledge), player) <= 0)
return;
if (player.IsDoingQuest(typeof(SearchForKnowledge)) != null)
return;
if (response == 0x00)
{
// Player declined, don't do anything.
}
else
{
// Player accepted, let's try to give him the quest.
if (!Blercyn.GiveQuest(typeof(SearchForKnowledge), player, 1))
return;
}
}
示例5: CheckPlayerAcceptQuest
/* This is our callback hook that will be called when the player clicks
* on any button in the quest offer dialog. We check if he accepts or
* declines here...
*/
private static void CheckPlayerAcceptQuest(GamePlayer player, byte response)
{
//We recheck the qualification, because we don't talk to players
//who are not doing the quest
if(elvarIronhand.CanGiveQuest(typeof (BuildingABetterBow), player) <= 0)
return;
if (player.IsDoingQuest(typeof (BuildingABetterBow)) != null)
return;
if (response == 0x00)
{
SendReply(player, "Oh well, if you change your mind, please come back!");
}
else
{
//Check if we can add the quest!
if (!elvarIronhand.GiveQuest(typeof (BuildingABetterBow), player, 1))
return;
SendReply(player, "Wonderful! It's going to be difficult to get ahold of the right kind of horn, so I think it would be best to experiment with bone [first].");
}
}
示例6: CheckPlayerAcceptQuest
/* This is our callback hook that will be called when the player clicks
* on any button in the quest offer dialog. We check if he accepts or
* declines here...
*/
private static void CheckPlayerAcceptQuest(GamePlayer player, byte response)
{
//We recheck the qualification, because we don't talk to players
//who are not doing the quest
if(addrir.CanGiveQuest(typeof (ImportantDelivery), player) <= 0)
return;
ImportantDelivery quest = player.IsDoingQuest(typeof (ImportantDelivery)) as ImportantDelivery;
if (quest != null)
return;
if (response == 0x00)
{
SendReply(player, LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.CheckPlayerAcceptQuest.NoAccept"));
}
else
{
//Check if we can add the quest!
if (!addrir.GiveQuest(typeof (ImportantDelivery), player, 1))
return;
addrir.SayTo(player, LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.CheckPlayerAcceptQuest.Accept"));
}
//language manager support for items
recruitsDiary.Name = LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.DefineItems.RecruitsDiary");
sackOfSupplies.Name = LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.DefineItems.SackOfSupplies");
crateOfVegetables.Name = LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.DefineItems.CrateOfVegetables");
recruitsCloak.Name = LanguageMgr.GetTranslation(player.Client, "Hib.ImportantDelivery.DefineItems.RecruitsCloak");
}
示例7: CheckQuestQualification
/// <summary>
/// This method checks if a player qualifies for this quest
/// </summary>
/// <returns>true if qualified, false if not</returns>
public override bool CheckQuestQualification(GamePlayer player)
{
// if the player is already doing the quest his level is no longer of relevance
if (player.IsDoingQuest(typeof (ImportantDelivery)) != null)
return true;
// This checks below are only performed is player isn't doing quest already
if (!CheckPartAccessible(player, typeof (ImportantDelivery)))
return false;
if (player.Level < minimumLevel || player.Level > maximumLevel)
return false;
return true;
}
示例8: CheckPlayerAbortQuest
/* This is our callback hook that will be called when the player clicks
* on any button in the quest offer dialog. We check if he accepts or
* declines here...
*/
private static void CheckPlayerAbortQuest(GamePlayer player, byte response)
{
WingsOfTheIsleHibernia quest = player.IsDoingQuest(typeof(WingsOfTheIsleHibernia)) as WingsOfTheIsleHibernia;
if (quest == null)
return;
if (response != 0x00)
{
SendSystemMessage(player, "Aborting Quest " + questTitle + ". You can start over again if you want.");
quest.AbortQuest();
}
}
示例9: CheckPlayerAcceptQuest
private static void CheckPlayerAcceptQuest(GamePlayer player, byte response)
{
if(Ferowl.CanGiveQuest(typeof (Academy_50), player) <= 0)
return;
if (player.IsDoingQuest(typeof (Academy_50)) != null)
return;
if (response == 0x00)
{
player.Out.SendMessage("Our God forgives your laziness, just look out for stray lightning bolts.", eChatType.CT_Say, eChatLoc.CL_PopupWindow);
}
else
{
// Check to see if we can add quest
if (!Ferowl.GiveQuest(typeof (Academy_50), player, 1))
return;
Ferowl.SayTo(player, "I have heard rumors about the witch [Morgana] trying to summon an army of demons to crush the mighty city of Camelot!");
}
}
示例10: CheckPlayerAcceptQuest
private static void CheckPlayerAcceptQuest(GamePlayer player, byte response)
{
if (Charles.CanGiveQuest(typeof(childsplay), player) <= 0)
return;
if (player.IsDoingQuest(typeof(childsplay)) != null)
return;
if (response == 0x00)
{
SendReply(player, LanguageMgr.GetTranslation(player.Client, "ChildsPlay.CheckPlayerAcceptQuest.Text1"));
}
else
{
if (!Charles.GiveQuest(typeof(childsplay), player, 1))
return;
SendReply(player, LanguageMgr.GetTranslation(player.Client, "ChildsPlay.CheckPlayerAcceptQuest.Text2"));
}
}
示例11: CheckPlayerAbortQuest
private static void CheckPlayerAbortQuest(GamePlayer player, byte response)
{
childsplay quest = player.IsDoingQuest(typeof(childsplay)) as childsplay;
if (quest == null)
return;
if (response == 0x00)
{
SendSystemMessage(player, LanguageMgr.GetTranslation(player.Client, "ChildsPlay.CheckPlayerAbortQuest.Text1"));
}
else
{
SendSystemMessage(player, LanguageMgr.GetTranslation(player.Client, "ChildsPlay.CheckPlayerAbortQuest.Text2", questTitle));
quest.AbortQuest();
}
}
示例12: CheckQuestQualification
/// <summary>
/// This method checks if a player qualifies for this quest
/// </summary>
/// <returns>true if qualified, false if not</returns>
public override bool CheckQuestQualification(GamePlayer player)
{
if (player.IsDoingQuest(typeof(childsplay)) != null)
return true;
if (player.Level < minimumLevel || player.Level > maximumLevel)
return false;
return true;
}
示例13: CheckPlayerAcceptQuest
private static void CheckPlayerAcceptQuest(GamePlayer player, byte response)
{
if(Roben.CanGiveQuest(typeof (Church_50), player) <= 0)
return;
if (player.IsDoingQuest(typeof (Church_50)) != null)
return;
if (response == 0x00)
{
player.Out.SendMessage("Our God forgives your laziness, just look out for stray lightning bolts.", eChatType.CT_Say, eChatLoc.CL_PopupWindow);
}
else
{
// Check to see if we can add quest
if (!Roben.GiveQuest(typeof (Church_50), player, 1))
return;;
Roben.SayTo(player, "You must not let this occur " + player.GetName(0, false) + "! I am familar with [Lyonesse]. I suggest that you gather a strong group of adventurers in order to succeed in this endeavor!");
}
}
示例14: CheckPlayerAbortQuest
/* This is our callback hook that will be called when the player clicks
* on any button in the quest offer dialog. We check if he accepts or
* declines here...
*/
private static void CheckPlayerAbortQuest(GamePlayer player, byte response)
{
ANewHeroesWelcome quest = player.IsDoingQuest(typeof(ANewHeroesWelcome)) as ANewHeroesWelcome;
if (quest == null)
return;
if (response == 0x00)
{
SendSystemMessage(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.ANewHeroesWelcome.CheckPlayerAbortQuest.Text1"));
}
else
{
SendSystemMessage(player, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.ANewHeroesWelcome.CheckPlayerAbortQuest.Text2", questTitle));
quest.AbortQuest();
}
}
示例15: CheckPlayerAcceptQuest
/* This is our callback hook that will be called when the player clicks
* on any button in the quest offer dialog. We check if he accepts or
* declines here...
*/
private static void CheckPlayerAcceptQuest(GamePlayer player, byte response)
{
//We recheck the qualification, because we don't talk to players
//who are not doing the quest
if(sirJerem.CanGiveQuest(typeof (ShakenSquire), player) <= 0)
return;
if (player.IsDoingQuest(typeof (ShakenSquire)) != null)
return;
if (response == 0x00)
{
SendReply(player, "Oh well, if you change your mind, please come back!");
}
else
{
//Check if we can add the quest!
if (!sirJerem.GiveQuest(typeof (ShakenSquire), player, 1))
return;
SendReply(player, "Thank you for agreeing to help. I'm fairly sure that Master Graent has been telling him all kinds of tales about the Tomb of Mithra to the east. Come to think of it, I know I've seen the squire speaking with him more than [once].");
}
}