Jump to content

FunkyBit

Members
  • Posts

    55
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by FunkyBit

  1. * What bug does the patch fix?

    Currently "Blessing of Light" increases not the healing taken by the player who has this buff.

    It wrongly increases the healing done by a paladin that buffs this spell onto himself.

    It was wronly taken the AuraList of the caster of the healing spell instead of the AuraList of the target.

    * For which repository revision was the patch created?

    MaNGOS-One, s1434 (up2date)

    * Who has been writing this patch?

    me

    diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
    index 43b396a..44f5f08 100644
    --- a/src/game/Unit.cpp
    +++ b/src/game/Unit.cpp
    @@ -6528,7 +6528,7 @@ uint32 Unit::SpellHealingBonusTaken(Unit *pCaster, SpellEntry const *spellProto,
        // Blessing of Light dummy effects healing taken from Holy Light and Flash of Light
        if (spellProto->SpellFamilyName == SPELLFAMILY_PALADIN && (spellProto->SpellFamilyFlags & UI64LIT(0x00000000C0000000)))
        {
    -        AuraList const& mDummyAuras = pCaster->GetAurasByType(SPELL_AURA_DUMMY);
    +        AuraList const& mDummyAuras = GetAurasByType(SPELL_AURA_DUMMY);
            for(AuraList::const_iterator i = mDummyAuras.begin();i != mDummyAuras.end(); ++i)
            {
                if((*i)->GetSpellProto()->SpellVisual == 9180)
    
    

  2. I just hat the time to take the first look at the patch.

    Do I understand it right, that you used only ENTRYs to link and group creatures? So it is only possible to link a complete species of creatures to an other?

    If that is:

    That would be not sufficient to cope with all the creature-to-creature respawn relations in all the different instances.

    It is often that you find a species bevor and after a boss and if the boss dies the mobs bevor should not respawn but the mobs after him should.

    For my opinion the GUID of each mob must be used to link this spawned creature to an other one.

    Otherwise I see no way to apply this system for example to Eye of the Storm, SSC, Steamvault, Karazhan, Gruul, Shadow Lab. and many more.

    Edit:

    Ah sorry, just have re-read the first post and found:

    - support for DB-guid (needed for some fine-linking and following)

    Well ok... but still... for my feeling and as I mentaly walked through the instances... the total generic solution by using the ENTRYs is the rare one.

  3. I believe that one of the remaining ones leads the group

    In general this statement is wrong.

    In instances (and this was tested by my girlfriend in SSC just last week on retail) whenever you have a group of mobs that all come together on pull...

    ...whenever you whipe and at least one mob is still alive, then the whole group respawns and you have to do the whole group again.

    This results for mob groups that no "leader change" is needed because on enter evade all respawn and the default leader is available again to link the other mobs.

    I can't imagine a case where you kill just a part of a group and the rest needs to choose a new leader and continue their path - either you defeate them or they defeat you -> no mob left or all respawn and reset.

    This grouped respawn (and also grouped aggro; means that you can define mobs standing together and you can never just pull one or a part of it) behaviour is missing for MaNGOS. If you take these challenges as seperate tasks and implement these first... you don't have to worry about the behaviour when patrolling mob groups just die partly.

    Please note: Just take this statement valid for TBC instances as SSC, Eye, ... that I have seen myself working that way. I didn't pay attention to this in the open world area or WotLK/Classic instance content.

  4. What Bug is this about?

    When a server is up longer than 2 days the heroic instances don't get resetted anymore.

    What version was this Bug written for?

    MaNGOS-0.12 up2date; as far as I read the code this could be a problem in Master too.

    Who tracked the error down and wrote the change?

    Funkybit and Baileys

    Description of Bug in Detail:

    I have to restart my server at least every 2 days otherwise the daily or raid instances don't get their ID killed in the morning.

    So I noticed that 'm_resetTimeQueue' was about 32 entries right after server start but after a daily reset of heroic instances it only contains 17 entries.

    This concludes for me to:

    After you start your server, the heroic instances get resetted once normaly when the schedule event expires. Than after an other day there is no event to expire again because when the last one for that map was executed it gets deleted but not readded to the queue.

    So we need to re-add it as it already happens in the 'event.type != RESET_EVENT_INFORM_LAST' case of the 'ScheduleReset(..)' method. This way we can ensure that there is always an event for each map that can expire and delete all the instance id's in the database.

    diff --git a/src/game/InstanceSaveMgr.cpp b/src/game/InstanceSaveMgr.cpp
    index bc8d89d..267a751 100644
    --- a/src/game/InstanceSaveMgr.cpp
    +++ b/src/game/InstanceSaveMgr.cpp
    @@ -287,28 +287,45 @@ void InstanceResetScheduler::ScheduleReset(bool add, time_t time, InstanceResetE
    void InstanceResetScheduler::Update()
    {
        time_t now = time(NULL), t;
    -    while(!m_resetTimeQueue.empty() && (t = m_resetTimeQueue.begin()->first) < now)
    +    while (!m_resetTimeQueue.empty() && (t = m_resetTimeQueue.begin()->first) < now)
        {
            InstanceResetEvent &event = m_resetTimeQueue.begin()->second;
    -        if(event.type == RESET_EVENT_DUNGEON)
    +        if (event.type == RESET_EVENT_DUNGEON)
            {
                // for individual normal instances, max creature respawn + X hours
                m_InstanceSaves._ResetInstance(event.mapid, event.instanceId);
    -            m_resetTimeQueue.erase(m_resetTimeQueue.begin());
            }
            else
            {
    -            // global reset/warning for a certain map
    +            // global reset/warning for a certain map (heroic/raid)
                time_t resetTime = GetResetTimeFor(event.mapid);
                m_InstanceSaves._ResetOrWarnAll(event.mapid, event.type != RESET_EVENT_INFORM_LAST, uint32(resetTime - now));
    -            if(event.type != RESET_EVENT_INFORM_LAST)
    +            if (event.type != RESET_EVENT_INFORM_LAST)
                {
                    // schedule the next warning/reset
                    event.type = ResetEventType(event.type+1);
                    ScheduleReset(true, resetTime - resetEventTypeDelay[event.type], event);
                }
    -            m_resetTimeQueue.erase(m_resetTimeQueue.begin());
    +            else
    +            {
    +                // re-schedule the next/new global reset/warning
    +                // calculate the next reset time
    +                InstanceTemplate const* temp = ObjectMgr::GetInstanceTemplate(event.mapid);
    +                uint32 diff = sWorld.getConfig(CONFIG_UINT32_INSTANCE_RESET_TIME_HOUR) * HOUR;
    +                uint32 period = InstanceResetScheduler::GetMaxResetTimeFor(temp);
    +                time_t next_reset = ((resetTime + MINUTE) / DAY * DAY) + period + diff;
    +
    +                ResetEventType type = RESET_EVENT_INFORM_1;
    +                for (; type < RESET_EVENT_INFORM_LAST; type = ResetEventType(type+1))
    +                    if (next_reset - resetEventTypeDelay[type] > now)
    +                        break;
    +
    +                // add new scheduler event to the queue
    +                event.type = type;
    +                ScheduleReset(true, next_reset - resetEventTypeDelay[event.type], event);
    +            }
            }
    +        m_resetTimeQueue.erase(m_resetTimeQueue.begin());
        }
    }
    
    

    http://gist.github.com/593766

    http://pastebin.com/mT6fHn0y

    So, I'm not really shure if this is the right way to do and would be happy to discuss this if any of you thinks it's wrong.

    Greets!

    Funkybit

  5. Hi!

    Just apply this little patch here

    diff --git a/dep/src/g3dlite/prompt.cpp b/dep/src/g3dlite/prompt.cpp
    index d78f8b7..df3da50 100644
    --- a/dep/src/g3dlite/prompt.cpp
    +++ b/dep/src/g3dlite/prompt.cpp
    @@ -21,6 +21,7 @@
    #    define _getch getchar
    #endif
    
    +#undef G3D_OSX
    #if 0 /* MANGOS exclude for disabled gui prompt */
    #ifdef G3D_OSX
    
    

    AND

    pimp the flags of your configure call with:

    CFLAGS="-framework Carbon" CXXFLAGS="-framework Carbon"

    This works for me and a second friend who also compiles on Mac OS X.

    Hope I could help!

  6. FunkyBit i can't understand why do you need 2 new tables with so many fields. Can you put some light on that idea if you want?

    As DasBlub already said, there are design reasons. In theory you can model the whole MaNGOS database in ONE table. But you would never do that because... well it would be hell!

    Data is mostly split up to match a normal form of database structure (http://en.wikipedia.org/wiki/Database_normalization). That's said simply to reduce data redundancy.

    Role-based security implies a low degree of trust among the administrative staff. In other words, you're not really all that sure what your GMs, devs, or mods might do behind you back. This is based on the truism that power corrupts. Give a guy some freedom to execute commands and he will invariably begin to abuse those commands for his own convenience. In an environment where staff members are not socially close, such as friends might be, this allows a staff member to feel a certain anonymity that can "hide" his misdeeds.

    Where you have a small staff that is closely bonded, you can have a high degree of trust. Peer pressure, personal integrity, or even old-fashioned decency will incline one to honor those ties of trust more than the impersonal environment of a large server staff. Here, you're a valued friend or well regarded colleague, not just another cog in the machine. It's a social place where you are more likely to actually care about the consequences of your actions, if not fear being cast out by your peers.

    As I said bevor structuring rights and permissions is also used to limit people to their field of tasks. A Dev with access to everything will start to give support or handle things his time is too valuable for.

    Imagine Vladimir would start to moderate this forum and loose focus from - we all thank good he is doing it - committing so wonderfull code changes.

    And you speak of small staff. And big staff? And what if some of your small staff quit the job or lose interest? Where do you get new ones? How do you test them? Do you give away all rights right from the beginning? Is a trial perido for new members not a totaly normal thing?

    If I had the possibility to bring people in my team I don't know perfect and therefor can't trust perfect, but I can integrate them to do some of the tasks I would have to do... and if I could controle their powers without to worry that they do crap... I can give people a chance to prove them who otherwise I could never give a chance because of structure reasons.

    And as some of you said "my server is small, I don't need that"... yes, okay, go with it, no problem at all. But that's no reason NOT to do it anyway.

    MaNGOS is for learning. I do a lot of that these days. And I believe that a role based permission system is much more advanced and flexible than a linear accumulation system. And reality gives me right.

    Forum software and MySQL itself are good candidates where other more primitive systems would be hell to handle.

    And also I belive that setting up such a system is just slightly more effort than it is now.

    And for the end... the power of a role based model is greater than the current one but you can model the current one in it. So no one loses anything. Some gain something.

  7. Because theorie is something different than practice.

    I know what I would like to have but I can't perform the changes myself.

    That's why I want to discuss it here and maybe someone with the necessary skills finds it worth his time.

    If you refer to the subline of this subforum ("Discuss code, review existing code, submit patches, or write implementation drafts for new and missing features.")... no I don't have any draft or anything that can be the start of it.

    It's just an idea and I'm searching for fans with skill.

  8. I don't see much problem...

    You have some sort of table structure:

    Table: right_role (with general settings)

    | id | name | isOnGMList | logToGMLog | logToUserLog | noLogoutDelay | ...

    Table: right_options (sets specific rights for each role)

    | id (refering to right_role table) | right_id | value | value2

    right_id's corespond to the in-code used flags or contants or whatever that identifies an ability to use some command. value/value2 may be true or fale or even an integer value (not currently used) that defines in what range a command can be used.

    So setting up a very simple role structure would mean you use the then existing default shipped with the mangos inital db query or slightly modify the initally by the mangos db query installed rights:

    You define roles: Mod, GM, Admin

    You add a right to these roles just by adding a line or delete a line.

    I realy can't understand why this should be difficult or cost more than 10 minutes work...

  9. I don't see why developers wouldn't need to be able to modify characters for health or items etc. If you don't trust someone, you shouldn't be giving them privileges in the first place.

    I learned that it is not wise to give anybody of your team the rights to do anything. They lose focus and start to work in the fields of others after some time. And Dev's can be defined in many ways. Usually I would prefer Dev's do generally work on their own MaNGOS systems and have one or two that can acctually commit (see MaNGOS itself, not everybody can commit to GIT and that is good!).

    devs usually have write access to database, so limiting them ingame its meaningless

    See bevor. I would not give any Dev complete write access to DB and server. Why should I? Dev's should deliver patches and bundles that are reviews by one or two lead Dev's who in the end activate changes. That's almost normal in larger developing processes, you need core review and approvement by others until your changes get accepted (again see MaNGOS).

    Give it a try and model your own forum structure with a linear rights model like MaNGOS.

    You have Mod's for different areas. There are different user groups that have access to different sections of the forum. And so on.

    Diablox idea is a start. But there still are problems. In the core there are parts like "what is written to a log", "who can see whom in gm invisible", all the sec_* stuff is still linear in the core even if I start to tune the command table and the accumulation of rights during read in on startup.

  10. Hi out there in the wild!

    I came up with an idea to modify and improve the ingame rights system.

    Currently rights are accumulated with increasing security level.

    That's a rather... outdated way of handling rights and their distribution to the staff.

    Almost any forum has role based rights management, without it there would be hell ^^

    On servers where you want to have a bit more ranks and a more complex permission structure the current system of increasing and accumulating rights is... a pain in the ass.

    Suggest you want to have Dev's that have an account to teleport, inspect and test stuff they just developed and check if commits and DB queries were included right. They should teleport and have access to the debug commands but should not modify any character any way. But your GMs should do that but should not have access to debug commands. Then there are some kind of ingame Mods who look after the chats and behaviour. They should be able to mute and maybe kick characters but nothing more but Devs shouldn't be able to do that.

    Try to modify that and much more in the current system... i gave up.

    So the idea was born the have a role based rights managment like in forum software.

    So you have many different possible roles that you can assign individual rights without warping these rights to outer user groups.

    I have to admit I have no idea how to start or do that...

    But maybe... YOU can and like the idea! ^^

    What do you think about a role based system? Is there something better or am I missing something?

  11. To tune up your MySQL config I highly suggest using "tuningprimer.sh" -> http://www.day32.com/MySQL/tuning-primer.sh // http://www.day32.com/MySQL/

    It produces output like:

    TEMP TABLES

    Current max_heap_table_size = 16 M

    Current tmp_table_size = 32 M

    Of 1091 temp tables, 84% were created on disk

    Effective in-memory tmp_table_size is limited to max_heap_table_size.

    Perhaps you should increase your max_heap_table_size and/or tmp_table_size.

    to reduce the number of disk-based temporary tables

    KEY BUFFER

    Current MyISAM index space = 1 M

    Current key_buffer_size = 1 M

    Key cache miss rate is 1 : 190

    Key buffer fill ratio = 6.00 %

    Your key_buffer_size seems to be too high.

    Perhaps you can use these resources elsewhere

    and many more...

    Run it on your linux machine and find resources and missconfigurations. It helped us a lot!

×
×
  • 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