Jump to content

Toinan67

Members
  • Posts

    389
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by Toinan67

  1. Hi,

    I chose not to create this thread in the "under review" section since I'm not sure of myself at all.

    I've noticed that when you land on the ground with a parachute (example : this one), the parachute is not removed.

    On retail, the parachute is removed when you land. I know there are some spells which don't have to be removed, like priest's levitate, but here is a possible fix for this :

    diff --git a/src/game/Player.cpp b/src/game/Player.cpp
    index 79ecd25..a7c98c7 100644
    --- a/src/game/Player.cpp
    +++ b/src/game/Player.cpp
    @@ -21347,6 +21347,8 @@ void Player::HandleFall(MovementInfo const& movementInfo)
                DEBUG_LOG("FALLDAMAGE z=%f sz=%f pZ=%f FallTime=%d mZ=%f damage=%d SF=%d" , movementInfo.GetPos()->z, height, GetPositionZ(), movementInfo.GetFallTime(), height
            }
        }
    +
    +    RemoveSpellsCausingAura(SPELL_AURA_SAFE_FALL);
    }
    

    So question is : what auras (SPELL_AURA_SAFE_FALL, SPELL_AURA_FEATHER_FALL, SPELL_AURA_HOVER, ...) need to be removed at landing?

  2. Do you know if the bug appears only with blacksmithing and those spells?

    I guess it bugs somewhere else...

    SkillHandler.cpp

    void WorldSession::HandleUnlearnSkillOpcode(WorldPacket & recv_data)
    {
       uint32 skill_id;
       recv_data >> skill_id;
       GetPlayer()->SetSkill(skill_id, 0, 0);
    }
    

    Player.cpp

    void Player::SetSkill(uint16 id, uint16 currVal, uint16 maxVal, uint16 step /*=0*/)
    {
       if(!id)
           return;
    
       SkillStatusMap::iterator itr = mSkillStatus.find(id);
    
       // has skill
       if(itr != mSkillStatus.end() && itr->second.uState != SKILL_DELETED)
       {
           if(currVal)
           {
              ...
           }
           else                                                //remove
           {
               // clear skill fields
               ...
    
               // mark as deleted or simply remove from map if not saved yet
               ...
    
               // remove all spells that related to this skill
               ...
    
               //READ ME HERE
    
               //I guess we should add something there, like :
               _RemoveAllItemMods();
               _ApplyAllItemMods();
               //(there's probably a faster way to do that...)
           }
       }
    

  3. Hi,

    I hope you're aware of the shiny new wiki created recently by TheLuda.

    As you can see on this page, the wiki is growing a bit more every day, but I think it's not enough. I'd like to see more guides, tutorials, and other stuff that would help new MaNGOS contributors. When I say tutorials, it's not about how install the last great repack for your public server, but tutorial on the source code itself.

    So I've recently started a tutorial about spells : MaNGOS spell system

    It's just the beginning and what I'm asking for is the help of others contributors to :

    -help me writing this tutorial : correct wrong translations, correct wrong statements, explain new things, etc. Actually I'm not a great C++ dev, what I write is just what I understand at the moment. I know some of you will find this page amusing, but keep in mind we were not all born "Vladimir" :P

    -create others tutorials about whatever you want : items, guilds, units, quest, battlegrounds, or more generic stuff like maps/vmaps, sessions, world, grid, etc.

    -create any other page you want, in any category you want (dev ideas need contribution!)

    Those tutorials are not here to replace a documentation, just to introduce some ideas to people, in a accessible way, less "automatic" than a generated documentation.

    Besides that, Electros has started to transfer all the DB structures pages from UDB wiki to this wiki. I think it's a good thing to have it on MaNGOS side, too (in case UDB wiki is down for example).

    So I've continued the work, added some missing tables, renamed somes old ones, added some missing fields, modified some outdated fields type. But there is still work to be done

    If you have some knowledge about MaNGOS db structure, don't hesitate to bring your contribution, you will have everybody's gratitude.

    Thanks!

    Take care

  4. Yes, I know it has no influence, it's just a proposal. I just thought doing it completely blizzlike would be best : retail multiplies the real threat by 100.

    Sending a *100 value would be enough, for sure

    My avatar is self-deprecating, just to make people know my posts can be completely wrong (as the last one was wrong obviously). And I like patrick.

    I hope I don't totally look like an idiot.

  5. So...should we make a config option like ThreatMultiplier ? Default value 100?

    Or a hardcoded define THREAT_MULTIPLIER like

    
    diff --git a/src/game/ThreatManager.h b/src/game/ThreatManager.h
    index 98ff67a..35156b5 100644
    --- a/src/game/ThreatManager.h
    +++ b/src/game/ThreatManager.h
    @@ -34,6 +34,7 @@ class ThreatManager;
    struct SpellEntry;
    
    #define THREAT_UPDATE_INTERVAL 1 * IN_MILLISECONDS    // Server should send threat update to client periodically each second
    +#define THREAT_MULTIPLIER      100                    // Since 3.0, threat is multiplied by 100 to optimize calculations
    
    //==============================================================
    // Class to calculate the real threat based
    diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
    index 2754e72..12d9f4a 100644
    --- a/src/game/Unit.cpp
    +++ b/src/game/Unit.cpp
    @@ -922,9 +922,9 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
            if (pVictim->GetTypeId() != TYPEID_PLAYER)
            {
                if(spellProto && IsDamageToThreatSpell(spellProto))
    -                pVictim->AddThreat(this, float(damage*2), (cleanDamage && cleanDamage->hitOutCome == MELEE_HIT_CRIT), damageSchoolMask, spellProto);
    +                pVictim->AddThreat(this, float(damage*2*THREAT_MULTIPLIER), (cleanDamage && cleanDamage->hitOutCome == MELEE_HIT_CRIT), damageSchoolMask, spellProto);
                else
    -                pVictim->AddThreat(this, float(damage), (cleanDamage && cleanDamage->hitOutCome == MELEE_HIT_CRIT), damageSchoolMask, spellProto);
    +                pVictim->AddThreat(this, float(damage*THREAT_MULTIPLIER), (cleanDamage && cleanDamage->hitOutCome == MELEE_HIT_CRIT), damageSchoolMask, spellProto);
            }
            else                                                // victim is a player
            {
    

  6. I feel exactly the same. Sometimes I feel like Cataclysm is gonna be Wotlk, without WoW history => total shit. I feel like this extension will be the death of WoW.

    But sometimes I feel it's gonna be a good extension, with more difficulty than Wotlk, back to basics with vanilla.

    The only thing I'm pretty sure will disappoint me is the story and the RP : the whole warcraft III thing we all know by heart is done now...deathwing is just a big dragon like the 150 we've seen all over wotlk.

  7. In other words using Tonian67 example:

    Imagine player A with 12345.678 threat and player B with 12345.000 so for the server A > B, now they are both sent as 12346 so for the client A = B which is wrong due to the loss of precision by the uint32 conversion.

    Also, as the screenshot suggests, on offy OMEN should show 1234568 and not 12346.

    Why does Omen should show 1234568 ? Omen shoud show the real threat, not a real_threat*100 .

    Anyway, it's not a 0.1 conversion problem : retail threat is 130 000, whereas private threat is 3 800. The ratio is something like.. 34, and you can see it on others threats :

    -51% on retail : 67 200 / 51% on private : 2 000 -> ratio of ~= 34

    -20% on retail : 26 200 / 19% on private: 733 -> ratio of ~= 34

  8. When treath is sent to client with Unit::SendThreathUpdate the value is converted with uint32((*itr)->getThreat()) and the decimal fraction is lost due to truncate while, IMHO, it should be sent as uint32((*itr)->getThreat()*100) so 2 decimal fraction is preserved and thus it will explain the 2 orders of magnitude.

    I didn't get it.

    Imagine (*itr)->getThreat() returns 12345.678

    conversion to uint32 would give : 12346

    You would do (*itr)->getThreat()*100, which is : 1234567.8

    conversion to uint32 : 1234568...

    Problem is not from threat sending I think...

  9. Yea the story is a bit over for Warcraft III players..but the whole story is way more than illidan and the lich king.

    I'm not so sad about the end of the story we know, I'm sad about how they ended Wotlk. Icc should have been a gigantic scary dark raid, incredibly hard.

    I'd have liked players were _afraid_ when they were in it ^^

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use