• Visit Rebornbuddy
  • rb 381 couldn't get pvp skill

    Discussion in 'Community Developer Forum' started by 钱浩然爸爸, Dec 21, 2019.

    1. 钱浩然爸爸

      钱浩然爸爸 Member

      Joined:
      Aug 27, 2017
      Messages:
      38
      Likes Received:
      1
      Trophy Points:
      8
      coding a pvp combat ,but couldn't get pvp skills
      OWUS}87OJ)C43DCT{P$18_Q.png A1%{VX@@W2%4699`7VKE)@2.png Q7}0})TT}YDU~D[{HDX(EPW.png
       
    2. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      4,327
      Likes Received:
      223
      Trophy Points:
      63
      PVP actions cannot be executed manually to protect users from executing actions they shouldn't be able to do. You must use DoPVPCombo. GetPVPComboCurrentAction is just for checking how far into a combo you are really.
       
    3. 钱浩然爸爸

      钱浩然爸爸 Member

      Joined:
      Aug 27, 2017
      Messages:
      38
      Likes Received:
      1
      Trophy Points:
      8
      my last words not clear.

      but now cancast can't return pvp skills available for use or not
       
    4. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      4,327
      Likes Received:
      223
      Trophy Points:
      63
      What class and level are you when you try that, and what zone?
       
    5. 钱浩然爸爸

      钱浩然爸爸 Member

      Joined:
      Aug 27, 2017
      Messages:
      38
      Likes Received:
      1
      Trophy Points:
      8
      Log(Core.Player.CurrentJob);
      Log(Core.Player.ClassLevel);
      Log(WorldManager.ZoneId);
      Log(WorldManager.InPvP);
      Log(ActionManager.ActionReady(ActionType.Spell, 8848));
      Log(ActionManager.CanCast(8848,null));
      Log(ActionManager.HasSpell(8848));
      Log(ActionManager.GetPvPComboCurrentActionId(18));

      Machinist
      80
      250
      True
      True
      False
      False
      8848
       
    6. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      4,327
      Likes Received:
      223
      Trophy Points:
      63
      Could you do

      Code:
      foreach(var item in ActionManager.CurrentActions.Values)
      {
      Log(item.DynamicString());
      }
      
       
    7. 钱浩然爸爸

      钱浩然爸爸 Member

      Joined:
      Aug 27, 2017
      Messages:
      38
      Likes Received:
      1
      Trophy Points:
      8
      here
       

      Attached Files:

    8. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      4,327
      Likes Received:
      223
      Trophy Points:
      63
      Can you try doing

      Code:
      SpellData spell;
      DataManager.SpellCache.TryGetValue(ActionManager.GetPvPComboCurrentActionId(18),out spell);
      Log(ActionManager.CanCast(spell,Core.Target));
      
      I think that should work. I'll need to adjust how GetPvPComboCurrentAction internally. Please let me know if that works or not.
       
    9. 钱浩然爸爸

      钱浩然爸爸 Member

      Joined:
      Aug 27, 2017
      Messages:
      38
      Likes Received:
      1
      Trophy Points:
      8



      SpellData spell;
      DataManager.SpellCache.TryGetValue(ActionManager.GetPvPComboCurrentActionId(18),out spell);
      Log(ActionManager.CanCast(spell,Core.Target));


      True


      no more
       
    10. 钱浩然爸爸

      钱浩然爸爸 Member

      Joined:
      Aug 27, 2017
      Messages:
      38
      Likes Received:
      1
      Trophy Points:
      8


      this can work but when out range of skill it alse return true.
       
    11. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      4,327
      Likes Received:
      223
      Trophy Points:
      63
      What are you passing in for the 2nd parameter?
       

    Share This Page