CombatReach, BoundingRadius, MeleeRange? menu

User Tag List

Results 1 to 13 of 13
  1. #1
    goderion's Avatar Active Member
    Reputation
    25
    Join Date
    Oct 2008
    Posts
    54
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CombatReach, BoundingRadius, MeleeRange?

    Hello.

    I need to find a way, to get the correct meleerange.

    I guess the fields:

    UNIT_FIELD_COMBATREACH
    UNIT_FIELD_BOUNDINGRADIUS

    of the unitstruct are the key, but i dont know really what they mean.

    The Fell Reaver in Hellfire Peninsula have:
    UNIT_FIELD_COMBATREACH: 20.0
    UNIT_FIELD_BOUNDINGRADIUS: 2.0

    my player got:
    UNIT_FIELD_COMBATREACH: 1.5
    UNIT_FIELD_BOUNDINGRADIUS: 0.383

    Do someone know more about this fields or to find a way to get the exact meleerange?

    I mean the maximum range i can have relative to a mob, to hit them with a melee-weapon.

    CombatReach, BoundingRadius, MeleeRange?
  2. #2
    Zombie911's Avatar Member
    Reputation
    11
    Join Date
    Mar 2008
    Posts
    31
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is my method:

    Code:
    /* 
    * WARNING: THIS IS PSEUDOCODE
    */
    
    struct POS{
         float x;     // 0x7d0 offset from item of curMgr
         float y;     // 0x7d4 offset from item of curMgr
         float z;     // 0x7d8 offset from item of curMgr
    };
    
    POS GetPlayerPos(){...}
    POS GetUnitPos(){...}
    
    //First need get Player and Unit positions (X,Y,Z)
    POS p = GetPlayerPos();
    POS u = GetUnitPos();
    
    // Use this formula for calculate distance between two points 
    float distance = sqrt(((p.x - u.x) * (p.x - u.x)) + ((p.y - u.y) * (p.y - u.y)));

  3. #3
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My guess is that the value you saw in the enum is the hitbox for the unit. For example, Onyxia would be a large number like 10.0 or something, maybe larger. I'm pretty sure the max melee range is 5 yards, just do some testing if you want to find out.

  4. #4
    Zombie911's Avatar Member
    Reputation
    11
    Join Date
    Mar 2008
    Posts
    31
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just forget! True, the melee range start from 5 yards. 1 yard == 1.0f
    Last edited by Zombie911; 01-28-2009 at 05:45 PM. Reason: Spell check))

  5. #5
    goderion's Avatar Active Member
    Reputation
    25
    Join Date
    Oct 2008
    Posts
    54
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for trying to help, but thats not an answer to my question.

    You can attack some mobs, even if you are more then 5 yards away of them!
    The next problem is, some mobs start to move backward, if you get to close to them, exspecially the really big ones.

    So i need to get the needed distance, to avoid, that the mob moves backward.

    EDIT:
    Every unit got this circle under his foot, green for friendly, orange/yeallow for neutral and red for hostile. Do someone know to read the size of this circle?
    Last edited by goderion; 01-29-2009 at 05:20 AM.

  6. #6
    Xarg0's Avatar Member
    Reputation
    61
    Join Date
    Jan 2008
    Posts
    389
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by goderion View Post
    Thanks for trying to help, but thats not an answer to my question.

    You can attack some mobs, even if you are more then 5 yards away of them!
    The next problem is, some mobs start to move backward, if you get to close to them, exspecially the really big ones.

    So i need to get the needed distance, to avoid, that the mob moves backward.

    EDIT:
    Every unit got this circle under his foot, green for friendly, orange/yeallow for neutral and red for hostile. Do someone know to read the size of this circle?
    Well, if UNIT_FIELD_COMBATREACH is for melee, you just need to make sure your distance to the mob is within UNIT_FIELD_COMBATREAC+5 to UNIT_FIELD_COMBATREACH.

    Another way to check if you're within melee range is using the lua function IsSpellInRange(spellID, spellType, unit).
    I hacked 127.0.0.1

  7. #7
    goderion's Avatar Active Member
    Reputation
    25
    Join Date
    Oct 2008
    Posts
    54
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Xarg0: Thanks for the hint.

    Mmmmh... this would mean, the meleerange for the Fel Reaver is max 25 yards, sounds a bit to large, or? Guess i need to start some experiments. ^^

  8. #8
    goderion's Avatar Active Member
    Reputation
    25
    Join Date
    Oct 2008
    Posts
    54
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mmmmh... this weird, i dont get a real conclusion of the UNIT_FIELDS.

    Damn, can someone tell me, why im unable to make an attachment! upload of file failed always! narf

    Here is a list as a CSV or MS ACCESS of Units with the most unitfields:
    RapidShare: Easy Filehosting

    Its quite interesting and maybe someone figure something out.

  9. #9
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by goderion View Post
    Mmmmh... this weird, i dont get a real conclusion of the UNIT_FIELDS.

    Damn, can someone tell me, why im unable to make an attachment! upload of file failed always! narf

    Here is a list as a CSV or MS ACCESS of Units with the most unitfields:
    RapidShare: Easy Filehosting

    Its quite interesting and maybe someone figure something out.

    Ummm. What?

  10. #10
    goderion's Avatar Active Member
    Reputation
    25
    Join Date
    Oct 2008
    Posts
    54
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post

    Ummm. What?
    Mmmh... guess my english isnt good?

    I mean, that im unable to find a way, to get the "real" meleerange through the unit fields. Cypher, you are common to model edit stuff, maybe you know, how to get the size of the green/yellow/red circle under the feet of the mobs.

    I tested yesterday many mobs, but the BoundingRadius and/or CombatReach dont make any sense related to the mobs/circle size.

    Check "Primordial Drake" in the list. He is huge and have a really big circle, but CombatReach is 1.000000 and BoundingRadius is 0.300000, a little to small values.

  11. #11
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by goderion View Post
    Mmmh... guess my english isnt good?

    I mean, that im unable to find a way, to get the "real" meleerange through the unit fields. Cypher, you are common to model edit stuff, maybe you know, how to get the size of the green/yellow/red circle under the feet of the mobs.

    I tested yesterday many mobs, but the BoundingRadius and/or CombatReach dont make any sense related to the mobs/circle size.

    Check "Primordial Drake" in the list. He is huge and have a really big circle, but CombatReach is 1.000000 and BoundingRadius is 0.300000, a little to small values.
    Actually I know next to nothing about model editing.

  12. #12
    shomoiog's Avatar Member
    Reputation
    20
    Join Date
    Dec 2008
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have no clue if it's true or not, but maybe you're getting the 1:1 model values from the unit fields, while the mob actually is scaled (check the relation to OBJECT_FIELD_SCALE_X) too.

  13. #13
    jbrauman's Avatar Member
    Reputation
    65
    Join Date
    Dec 2007
    Posts
    72
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by shomoiog View Post
    I have no clue if it's true or not, but maybe you're getting the 1:1 model values from the unit fields, while the mob actually is scaled (check the relation to OBJECT_FIELD_SCALE_X) too.
    That would make sense as some monsters are scaled up versions of different monsters (I assume they would keep the 'hitbox' the same size but relative to the scale)

All times are GMT -5. The time now is 06:31 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search