示例#1
0
        private void RightOndamage(ObjNPC npc, ObjCharacter caster, int damage)
        {
            mIsFubenInfoDirty = true;
            var unit = mFubenInfoMsg.Units[1];

            unit.Params[2] = npc.GetAttribute(eAttributeType.HpNow) * 100 / npc.GetAttribute(eAttributeType.HpMax);
        }
示例#2
0
        //女神受到伤害
        private void OnHolderDamage(ObjNPC npc, ObjCharacter caster, int damage)
        {
            mDataDirty = true;

            var hpPercent = (int)(100.0 * npc.GetAttribute(eAttributeType.HpNow) / npc.GetAttribute(eAttributeType.HpMax));

            mInfo3.Params[0] = hpPercent;
        }
示例#3
0
        private void MainTowerOndamage(ObjNPC npc, ObjCharacter caster, int damage)
        {
            mIsFubenInfoDirty = true;
            var unit2 = mFubenInfoMsg.Units[2];

            if (npc.IsDead() || !npc.Active)
            {
                unit2.Params[0] = 0;
            }
            else
            {
                unit2.Params[0] = npc.GetAttribute(eAttributeType.HpNow) * 100 / npc.GetAttribute(eAttributeType.HpMax);
            }
        }
        private void OnDamage50015(ObjNPC npc, ObjCharacter caster, int damage)
        {
            if (BattleObjIdList.Contains(mNpc50017.ObjId) || BattleObjIdList.Contains(mNpc50016.ObjId))
            {
                BroadcastScene(player => { player.Proxy.NotifyBattleReminder(14, Utils.WrapDictionaryId(100001506), 1); });
            }
            //副本信息
            var infoIdx   = FubenLogicRecord.SwitchInfoPa[0];
            var hpPercent = 100.0 * npc.GetAttribute(eAttributeType.HpNow) / npc.GetAttribute(eAttributeType.HpMax);

            SetFubenInfo(infoIdx, 0, (int)hpPercent);

            if (mBossHpWarn[1] == false && hpPercent <= 10)
            {
                mBossHpWarn[1] = true;
                BroadcastSceneSide(1, player =>
                {
                    //我支撑不了太久了!胜利的希望在哪里?
                    player.Proxy.NotifyMessage((int)eSceneNotifyType.Dictionary, 220430.ToString(), 1);
                });
            }
        }