本文整理汇总了C#中GamePlayer.UpdatePlayerStatus方法的典型用法代码示例。如果您正苦于以下问题:C# GamePlayer.UpdatePlayerStatus方法的具体用法?C# GamePlayer.UpdatePlayerStatus怎么用?C# GamePlayer.UpdatePlayerStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GamePlayer
的用法示例。
在下文中一共展示了GamePlayer.UpdatePlayerStatus方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnEffectStart
public override void OnEffectStart(GameSpellEffect effect)
{
effect.Owner.StartInterruptTimer(effect.Owner.SpellInterruptDuration, AttackData.eAttackType.Spell, Caster);
player = effect.Owner as GamePlayer;
if (player == null) return;
int slot=Util.Random(0, 2);
m_slot = slots[slot];
string msg = GlobalConstants.SlotToName((int)m_slot);
MessageToCaster("You debuff " + effect.Owner.Name + "'s " + msg+"", eChatType.CT_Spell);
foreach (GamePlayer visPlayer in player.GetPlayersInRadius((ushort)WorldMgr.VISIBILITY_DISTANCE))
visPlayer.Out.SendSpellEffectAnimation(player, player, (ushort)(13180+slot), 0, false, 0x01);
item = player.Inventory.GetItem((eInventorySlot)m_slot);
if(item!=null)
{
old_item_af=item.DPS_AF;
old_item_abs=item.SPD_ABS;
item.DPS_AF -= (int)Spell.Value;
item.SPD_ABS -= (int)Spell.ResurrectMana;
if(item.DPS_AF<0) item.DPS_AF=0;
if(item.SPD_ABS<0) item.SPD_ABS=0;
player.Client.Out.SendInventoryItemsUpdate(new InventoryItem[] { item });
player.Out.SendCharStatsUpdate();
player.UpdatePlayerStatus();
player.Out.SendUpdatePlayer();
player.Out.SendUpdateWeaponAndArmorStats();
player.Out.SendCharResistsUpdate();
GameEventMgr.AddHandler(player,GamePlayerEvent.Linkdeath, new DOLEventHandler(EventAction));
GameEventMgr.AddHandler(player,GamePlayerEvent.Quit, new DOLEventHandler(EventAction));
GameEventMgr.AddHandler(player,GamePlayerEvent.RegionChanged, new DOLEventHandler(EventAction));
GameEventMgr.AddHandler(player,GameLivingEvent.Dying, new DOLEventHandler(EventAction));
}
base.OnEffectStart(effect);
}
示例2: Start
protected virtual void Start(GamePlayer player)
{
playertarget = player;
StartTimers();
player.DebuffCategory[(int)eProperty.Dexterity] += (int)m_spell.Value;
player.DebuffCategory[(int)eProperty.Strength] += (int)m_spell.Value;
player.DebuffCategory[(int)eProperty.Constitution] += (int)m_spell.Value;
player.DebuffCategory[(int)eProperty.Acuity] += (int)m_spell.Value;
player.DebuffCategory[(int)eProperty.Piety] += (int)m_spell.Value;
player.DebuffCategory[(int)eProperty.Empathy] += (int)m_spell.Value;
player.DebuffCategory[(int)eProperty.Quickness] += (int)m_spell.Value;
player.DebuffCategory[(int)eProperty.Intelligence] += (int)m_spell.Value;
player.DebuffCategory[(int)eProperty.Charisma] += (int)m_spell.Value;
player.DebuffCategory[(int)eProperty.ArmorAbsorption] += (int)m_spell.Value;
player.Out.SendCharStatsUpdate();
player.UpdateEncumberance();
player.UpdatePlayerStatus();
player.Out.SendUpdatePlayer();
}
示例3: ResurrectLiving
public void ResurrectLiving(GamePlayer resurrectedPlayer, GameLiving rezzer)
{
if (rezzer.ObjectState != GameObject.eObjectState.Active)
return;
if (rezzer.CurrentRegionID != resurrectedPlayer.CurrentRegionID)
return;
resurrectedPlayer.Health = (int)(resurrectedPlayer.MaxHealth * m_resurrectValue / 100);
resurrectedPlayer.Mana = (int)(resurrectedPlayer.MaxMana * m_resurrectValue / 100);
resurrectedPlayer.Endurance = (int)(resurrectedPlayer.MaxEndurance * m_resurrectValue / 100); //no endurance after any rez
resurrectedPlayer.MoveTo(rezzer.CurrentRegionID, rezzer.X, rezzer.Y, rezzer.Z, rezzer.Heading);
GameLiving living = resurrectedPlayer as GameLiving;
GameTimer resurrectExpiredTimer = null;
lock (m_resTimersByLiving.SyncRoot)
{
resurrectExpiredTimer = (GameTimer)m_resTimersByLiving[living];
m_resTimersByLiving.Remove(living);
}
if (resurrectExpiredTimer != null)
{
resurrectExpiredTimer.Stop();
}
resurrectedPlayer.StopReleaseTimer();
resurrectedPlayer.Out.SendPlayerRevive(resurrectedPlayer);
resurrectedPlayer.UpdatePlayerStatus();
GameSpellEffect effect = SpellHandler.FindEffectOnTarget(resurrectedPlayer, GlobalSpells.PvERessurectionIllnessSpellType);
if (effect != null)
effect.Cancel(false);
resurrectedPlayer.Out.SendMessage("You have been resurrected by " + rezzer.GetName(0, false) + "!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
//Lifeflight: this should make it so players who have been ressurected don't take damage for 5 seconds
RezDmgImmunityEffect rezImmune = new RezDmgImmunityEffect();
rezImmune.Start(resurrectedPlayer);
//Lifeflight: We need to reward rez RPs
GamePlayer casterPlayer = rezzer as GamePlayer;
if (casterPlayer != null)
{
long rezRps = resurrectedPlayer.LastDeathRealmPoints * (m_resurrectValue + 50) / 1000;
if (rezRps > 0)
{
casterPlayer.GainRealmPoints(rezRps);
}
else
{
casterPlayer.Out.SendMessage("The player you resurrected was not worth realm points on death.", eChatType.CT_Important, eChatLoc.CL_SystemWindow);
casterPlayer.Out.SendMessage("You thus get no realm points for the resurrect.", eChatType.CT_Important, eChatLoc.CL_SystemWindow);
}
}
}