Advertisement
VANPER

[L2JDev] Resurrection time {CODE}

Nov 10th, 2020 (edited)
1,480
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.70 KB | None | 0 0
  1. Index: DlgAnswer.java
  2.  
  3. if (_messageId == SystemMessageId.S1_IS_MAKING_AN_ATTEMPT_AT_RESURRECTION_DO_YOU_WANT_TO_CONTINUE_WITH_THIS_RESURRECTION.getId())
  4.         {
  5.             player.reviveAnswer(_answer);
  6.         }
  7.  
  8. Index: PlayerInstance.java
  9.  
  10. public void reviveRequest(PlayerInstance reviver, Skill skill, boolean pet)
  11.     {
  12.         if (_reviveRequested == 1)
  13.         {
  14.             if (_revivePet == pet)
  15.             {
  16.                 reviver.sendPacket(SystemMessageId.RESURRECTION_HAS_ALREADY_BEEN_PROPOSED); // Resurrection is already been proposed.
  17.             }
  18.             else if (pet)
  19.             {
  20.                 reviver.sendPacket(SystemMessageId.A_PET_CANNOT_BE_RESURRECTED_WHILE_IT_S_OWNER_IS_IN_THE_PROCESS_OF_RESURRECTING); // A pet cannot be resurrected while it's owner is in the process of resurrecting.
  21.             }
  22.             else
  23.             {
  24.                 reviver.sendPacket(SystemMessageId.WHILE_A_PET_IS_ATTEMPTING_TO_RESURRECT_IT_CANNOT_HELP_IN_RESURRECTING_ITS_MASTER); // While a pet is attempting to resurrect, it cannot help in resurrecting its master.
  25.             }
  26.             return;
  27.         }
  28.         if ((pet && (getPet() != null) && getPet().isDead()) || (!pet && isDead()))
  29.         {
  30.             _reviveRequested = 1;
  31.             if (isPhoenixBlessed())
  32.             {
  33.                 _revivePower = 100;
  34.             }
  35.             else if (skill != null)
  36.             {
  37.                 _revivePower = Formulas.getInstance().calculateSkillResurrectRestorePercent(skill.getPower(), reviver);
  38.             }
  39.             else
  40.             {
  41.                 _revivePower = 0;
  42.             }
  43.             _revivePet = pet;
  44. +           ConfirmDlg confirm = new ConfirmDlg(SystemMessageId.S1_IS_MAKING_AN_ATTEMPT_AT_RESURRECTION_DO_YOU_WANT_TO_CONTINUE_WITH_THIS_RESURRECTION.getId());
  45. +           confirm.addString("Do you wish to Res?");
  46. +           confirm.addTime(45000);
  47. +           confirm.addRequesterId(reviver.getObjectId());
  48.            
  49. +           confirm.addString(reviver.getName());
  50. +           sendPacket(confirm);
  51.         }
  52.     }  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement