Jump to content

Prince

Members
  • Posts

    15
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by Prince

  1. Core: 8296

    SD2: 1294

    UDB: 382

    ACID: 31

    Patches: Cumulative patches by KAPATEJIb

    crash_log_2009-08-06_20-55-43.log

    Using host libthread_db library "/lib/libthread_db.so.1".
    Core was generated by `./bin/mangos-worldd -c etc/mangosd.conf'.
    Program terminated with signal 11, Segmentation fault.
    #0  Spell::DoCreateItem (this=0x1e420260, i=0, itemtype=2996) at ../../../src/game/Object.h:167
    167                ASSERT( index < m_valuesCount || PrintIndexError( index , false) );
    #0  Spell::DoCreateItem (this=0x1e420260, i=0, itemtype=2996) at ../../../src/game/Object.h:167
       pItem = (class Item *) 0x40827a10
       num_to_add = 1
       items_count = <value optimized out>
       additionalCreateChance = 0
       additionalMaxNum = 0 '\\0'
       dest = {<std::_Vector_base<ItemPosCount,std::allocator<ItemPosCount> >> = {
    

    could someone finally stop this spamer, thanks?! it can't be that one guy post one crash hundrets of times! :mad:

  2. Hello!

    I would like to use code like this (Ahn'kahet example) for instance achievements:

                        if (!onedead)
                       {   /* Nicht möglich, da "CompletedAchievement()" privat ist!
                           AchievementEntry const* AE = sAchievementStore.LookupEntry(AchievementVolunteerWork);
    
                           Map::PlayerList const &PlayerList = instance->GetPlayers();
                           if (!PlayerList.isEmpty())
                           {
                               for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
                                   (i->getSource())->GetAchievementMgr().CompletedAchievement(AE);
                           }*/
                       }
    

    the problem is that CompletedAchievement() is a private function. Couldn't / shouldn't we not simple make it public to let developer use this in instance scripts!? :confused:

  3. maybe a fix could be:

    if (cVictim->GetCreatureInfo()->lootid || cVictim->loot.gold)

    (but haven't looked if bones are also a Unit and if it compiles and so on.. just a guess :) )

    edit: sorry my idea is wrong - cause cVictim is actually a creature.. so i don't know how it could affect player

    no. it's the same problem as with arrais issue. the loot is first created if the player try to loot something. you can't check at this place wether the loot is empty (if there is a loot id) nor if there is gold. that's the problem which i wrote above.

    my patch is only for creatures (npcs).

  4. because of this bothers me since mangos was born, i wrote this just in the moment... on offi you'll never get lootable animation for creatures without loot.

    What bug does the patch fix? What features does the patch add?

    - it prevent to show the lootable animation for creatures without loot

    For which repository revision was the patch created?

    - rev 8250

    Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

    - I don't believe it... I don't know...

    Who has been writing this patch? Please include either forum user names or email addresses.

    - Prince

    THE DIFF

    diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
    index 0b67a2f..0dfda03 100644
    --- a/src/game/Unit.cpp
    +++ b/src/game/Unit.cpp
    @@ -647,7 +657,8 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
                if(!cVictim->isPet())
                {
                    cVictim->DeleteThreatList();
    -                cVictim->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
    +                if (cVictim->GetCreatureInfo()->lootid)
    +                    cVictim->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
                }
                // Call creature just died function
                if (cVictim->AI())
    

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