@@ -28,31 +28,33 @@ public class L2Character : L2Object
2828
2929 public byte IsRunning { get ; set ; } = 1 ;
3030
31- public int AbnormalBitMask ;
32- public int AbnormalBitMaskEx ;
33- public int AbnormalBitMaskEvent ;
34-
35- public const int AbnormalMaskBleed = 0x000001 ;
36-
37- public const int AbnormalMaskExInvincible = 0x000001 ;
38- public const int AbnormalMaskExAirStun = 0x000002 ;
39- public const int AbnormalMaskExAirRoot = 0x000004 ;
40- public const int AbnormalMaskExBagSword = 0x000008 ;
41- public const int AbnormalMaskExAfroYellow = 0x000010 ;
42- public const int AbnormalMaskExAfroPink = 0x000020 ;
43- public const int AbnormalMaskExAfroBlack = 0x000040 ;
44- //unk x80
45- public const int AbnormalMaskExStigmaShillien = 0x000100 ;
46- public const int AbnormalMaskExStakatoRoot = 0x000200 ;
47- public const int AbnormalMaskExFreezing = 0x000400 ;
48- public const int AbnormalMaskExVesper = 0x000800 ;
49-
50- public const int AbnormalMaskEventIceHand = 0x000008 ;
51- public const int AbnormalMaskEventHeadphone = 0x000010 ;
52- public const int AbnormalMaskEventCrown1 = 0x000020 ;
53- public const int AbnormalMaskEventCrown2 = 0x000040 ;
54- public const int AbnormalMaskEventCrown3 = 0x000080 ;
55-
31+ #region AbhornalMask
32+ public int AbnormalBitMask ;
33+ public int AbnormalBitMaskEx ;
34+ public int AbnormalBitMaskEvent ;
35+
36+ public const int AbnormalMaskBleed = 0x000001 ;
37+
38+ public const int AbnormalMaskExInvincible = 0x000001 ;
39+ public const int AbnormalMaskExAirStun = 0x000002 ;
40+ public const int AbnormalMaskExAirRoot = 0x000004 ;
41+ public const int AbnormalMaskExBagSword = 0x000008 ;
42+ public const int AbnormalMaskExAfroYellow = 0x000010 ;
43+ public const int AbnormalMaskExAfroPink = 0x000020 ;
44+ public const int AbnormalMaskExAfroBlack = 0x000040 ;
45+ //unk x80
46+ public const int AbnormalMaskExStigmaShillien = 0x000100 ;
47+ public const int AbnormalMaskExStakatoRoot = 0x000200 ;
48+ public const int AbnormalMaskExFreezing = 0x000400 ;
49+ public const int AbnormalMaskExVesper = 0x000800 ;
50+
51+ public const int AbnormalMaskEventIceHand = 0x000008 ;
52+ public const int AbnormalMaskEventHeadphone = 0x000010 ;
53+ public const int AbnormalMaskEventCrown1 = 0x000020 ;
54+ public const int AbnormalMaskEventCrown2 = 0x000040 ;
55+ public const int AbnormalMaskEventCrown3 = 0x000080 ;
56+ #endregion
57+
5658 public int Int => CharacterStat . Int ;
5759
5860 public int Str => CharacterStat . Str ;
@@ -429,39 +431,38 @@ public void ReduceHpArea(int damage, int msgId)
429431 // SendPacket(new SystemMessage((SystemMessage.SystemMessageId)msgId).AddNumber(damage));
430432 }
431433
432- public override void ReduceHp ( L2Character attacker , double damage )
433- {
434- if ( Dead )
435- return ;
436-
437- //if ((this is L2Player && attacker is L2Player))
438- //{
439- // if (CurCp > 0)
440- // {
441- // CurCp -= damage;
442-
443- // if (CurCp < 0)
444- // {
445- // damage = CurCp * -1;
446- // CurCp = 0;
447- // }
448- // }
449- //}
450-
451- CharStatus . CurrentHp -= damage ;
452-
453- StatusUpdate statusUpdate = new StatusUpdate ( this ) ;
454- statusUpdate . Add ( StatusUpdate . CurHp , ( int ) CharStatus . CurrentHp ) ;
455- // statusUpdate.Add(StatusUpdate.CurCp, (int)CurCp);
456- BroadcastPacket ( statusUpdate ) ;
457-
458- if ( CharStatus . CurrentHp <= 0 )
459- {
460- CharStatus . CurrentHp = 0 ;
461- DoDie ( attacker ) ;
462- return ;
463- }
464- }
434+ //public override void ReduceHp(L2Character attacker, double damage)
435+ //{
436+ // if (Dead)
437+ // return;
438+
439+ // //if ((this is L2Player && attacker is L2Player))
440+ // //{
441+ // // if (CurCp > 0)
442+ // // {
443+ // // CurCp -= damage;
444+
445+ // // if (CurCp < 0)
446+ // // {
447+ // // damage = CurCp * -1;
448+ // // CurCp = 0;
449+ // // }
450+ // // }
451+ // //}
452+
453+ // CharStatus.ReduceHp(damage,attacker);
454+
455+ // StatusUpdate statusUpdate = new StatusUpdate(this);
456+ // statusUpdate.Add(StatusUpdate.CurHp, (int)CharStatus.CurrentHp);
457+ // // statusUpdate.Add(StatusUpdate.CurCp, (int)CurCp);
458+ // BroadcastPacket(statusUpdate);
459+
460+ // if (CharStatus.CurrentHp <= 0)
461+ // {
462+ // DoDie(attacker);
463+ // return;
464+ // }
465+ //}
465466
466467 public virtual void DoDie ( L2Character killer )
467468 {
@@ -470,7 +471,7 @@ public virtual void DoDie(L2Character killer)
470471 if ( Dead )
471472 return ;
472473
473- CharStatus . CurrentHp = 0 ;
474+ CharStatus . SetCurrentHp ( 0 ) ;
474475
475476 Dead = true ;
476477 }
@@ -637,7 +638,7 @@ public virtual void AttackDoHit(object sender, ElapsedEventArgs e)
637638 {
638639 if ( ! Hit1 . Miss )
639640 {
640- Target . ReduceHp ( this , Hit1 . Damage ) ;
641+ Target . CharStatus . ReduceHp ( Hit1 . Damage , this ) ;
641642
642643 if ( Target is L2Player )
643644 Target . SendPacket ( new SystemMessage ( SystemMessage . SystemMessageId . C1HasReceivedS3DamageFromC2 ) . AddName ( Target ) . AddName ( this ) . AddNumber ( Hit1 . Damage ) ) ;
@@ -660,7 +661,7 @@ public virtual void AttackDoHit2Nd(object sender, ElapsedEventArgs e)
660661 {
661662 if ( ! Hit2 . Miss )
662663 {
663- Target . ReduceHp ( this , Hit2 . Damage ) ;
664+ Target . CharStatus . ReduceHp ( Hit2 . Damage , this ) ;
664665 if ( Target is L2Player )
665666 Target . SendPacket ( new SystemMessage ( SystemMessage . SystemMessageId . C1HasReceivedS3DamageFromC2 ) . AddName ( Target ) . AddName ( this ) . AddNumber ( Hit2 . Damage ) ) ;
666667 }
0 commit comments