本文整理汇总了C#中GamePlayer.GainBountyPoints方法的典型用法代码示例。如果您正苦于以下问题:C# GamePlayer.GainBountyPoints方法的具体用法?C# GamePlayer.GainBountyPoints怎么用?C# GamePlayer.GainBountyPoints使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GamePlayer
的用法示例。
在下文中一共展示了GamePlayer.GainBountyPoints方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Refund
public void Refund(InventoryItem item, GamePlayer player)
{
bool can = false;
if (item.PackageID.ToLower().Contains("art"))
{
can = true;
}
if (item.Name.Contains("Special"))
{
can = true;
}
if (item.Name.Contains("Dragon"))
{
can = true;
}
if (item.Name.Contains("Pyroc"))
{
can = true;
}
if (item.Name.Contains("Lith"))
{
can = true;
}
if (item.Name.Contains("Benth"))
{
can = true;
}
if (item.Name.Contains("Tempest"))
{
can = true;
}
if (item.Name.Contains("Dragonslayer"))
{
can = true;
}
switch (item.PackageID)
{
case "LabWeaps":
case "Artifacts":
case "Bounty Jewlery":
case "DragonWeapons":
can = true;
break;
}
if (can == true)
{
player.Inventory.RemoveItem(item);
player.GainBountyPoints(item.Price, false);
}
}
示例2: CheckOfferQuest
/// <summary>
/// A player has interacted with an object that has a DataQuest.
/// Check to see if we can offer this quest to the player and display the text
/// </summary>
/// <param name="player"></param>
/// <param name="obj"></param>
protected virtual void CheckOfferQuest(GamePlayer player, GameObject obj)
{
// Can we offer this quest to the player?
if (CheckQuestQualification(player))
{
if (StartType == eStartType.InteractComplete)
{
// This quest finishes with the interaction
CharacterXDataQuest charQuest = GetCharacterQuest(player, ID, true);
if (charQuest.Count < MaxQuestCount)
{
TryTurnTo(obj, player);
if (ExecuteCustomQuestStep(player, 0, eStepCheckType.Finish))
{
if (Description.Trim() != "")
{
SendMessage(player, Description, 0, eChatType.CT_System, eChatLoc.CL_PopupWindow);
}
if (m_finalRewards.Count > 0)
{
lock (player.Inventory)
{
if (player.Inventory.IsSlotsFree(m_finalRewards.Count, eInventorySlot.FirstBackpack, eInventorySlot.LastBackpack))
{
foreach (ItemTemplate item in m_finalRewards)
{
if (item != null)
{
GiveItem((obj is GameLiving ? obj as GameLiving : null), player, item, false);
}
}
}
else
{
SendMessage(player, "Your inventory does not have enough space to finish this quest!", 0, eChatType.CT_System, eChatLoc.CL_PopupWindow);
return;
}
}
}
if (m_rewardXPs.Count > 0 && m_rewardXPs[0] > 0)
{
player.GainExperience(GameLiving.eXPSource.Quest, m_rewardXPs[0]);
}
if (m_rewardCLXPs.Count > 0 && m_rewardCLXPs[0] > 0)
{
player.GainChampionExperience(m_rewardCLXPs[0], GameLiving.eXPSource.Quest);
}
if (m_rewardRPs.Count > 0 && m_rewardRPs[0] > 0)
{
player.GainRealmPoints(m_rewardRPs[0]);
}
if (m_rewardBPs.Count > 0 && m_rewardBPs[0] > 0)
{
player.GainBountyPoints(m_rewardBPs[0]);
}
if (m_rewardMoneys.Count > 0 && m_rewardMoneys[0] > 0)
{
player.AddMoney(m_rewardMoneys[0], "You are awarded {0}!");
InventoryLogging.LogInventoryAction("(QUEST;" + Name + ")", player, eInventoryActionType.Quest, m_rewardMoneys[0]);
}
charQuest.Count++;
GameServer.Database.SaveObject(charQuest);
bool add = true;
lock (player.QuestListFinished)
{
foreach (AbstractQuest q in player.QuestListFinished)
{
if (q is DataQuest && (q as DataQuest).ID == ID)
{
add = false;
break;
}
}
}
if (add)
{
player.QuestListFinished.Add(this);
}
player.Out.SendQuestListUpdate();
player.Out.SendMessage(String.Format(LanguageMgr.GetTranslation(player.Client.Account.Language, "AbstractQuest.FinishQuest.Completed", Name)), eChatType.CT_ScreenCenter, eChatLoc.CL_SystemWindow);
//.........这里部分代码省略.........