1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

When a player rides a mount, what code changes the player's moving speed?

Discussion in 'Script Support' started by longtianchi, Nov 22, 2018.

  1. longtianchi
    Offline

    longtianchi Member

    Joined:
    Mar 28, 2015
    Messages:
    30
    Likes Received:
    0
    I looked at the code and found the Rider function.
    But Rider function does not handle the code for ride actions.
    I read the code for EtherealMount and BaseMount.
    These base classes and interfaces did not find the ride action code
    When a player rides a mount, what code changes the player's moving speed?
    What code implements it?
     
    #1 longtianchi, Nov 22, 2018
    Last edited: Nov 23, 2018
  2. Greystar
    Offline

    Greystar Member

    Joined:
    Feb 20, 2014
    Messages:
    67
    Likes Received:
    3
    I suspect the creature goes to the internal map when its mounted. However I don't know this for certain.
     
  3. Po0ka
    Offline

    Po0ka Active Member

    Joined:
    Aug 19, 2014
    Messages:
    693
    Likes Received:
    82
    Root up from where you know, check the base classes, check the interface (probably IMountable or IRidable), and then search where that code is used.
    It is most likely handled in the core itself, due to the possible packets it could send to the client.

    To test if the mount ges to internal, do [props on it, ride it, change the page back and forth and spot the "map" property, and validate where it is.
     
  4. longtianchi
    Offline

    longtianchi Member

    Joined:
    Mar 28, 2015
    Messages:
    30
    Likes Received:
    0
    IMountItem is the corresponding interface
    But it doesn't handle mounts.
    I am very upset.
    This question puzzled me for a long time.
    --- Double Post Merged, Nov 23, 2018 ---
    @Dexter_Lexia has helped me solve this problem.
    Thank you to everyone who helped me.
    There is a ComputeMovementSpeed method in the Mobil.cs
    This method judges Mounted to determine the speed of movement.
    The Mounted Get method returns whether the player has a Layout.Mount item.
    If there is one,it means that the player is in the ride state.
    BaseMount class new a Iayout.Mount item.(m_InternalItem = new MountItem(this, itemID)
    When players are riding,Gave players.(In the BaseMount.Rider method)
     
    #4 longtianchi, Nov 23, 2018
    Last edited: Nov 23, 2018
Similar Threads: player rides
Forum Title Date
Script Support To prevent players and players from passing What should I do? Jan 3, 2019
Script Support Approaching Player names and item names Dec 24, 2018
Archived Bug Reports Heat of Battle - two player pets bugs Dec 23, 2018
Shards Looking For Players Akara Essex Snce 2003 looking for old and new players Dec 22, 2018
Shards Looking For Players Phantasy Online looking for players/testers. Dec 7, 2018
Script Support 1 item doesnt block 2 stacked items blocks player Nov 30, 2018
Script Support Give a player an item then equip it Nov 24, 2018