Page 1 of 1

Bug #221 Fix / Patch

Posted: Mon Jun 03, 2013 5:36 am
by atom0s
Bug Report: http://bugs.dspt.info/show_bug.cgi?id=221

Debugged this a bit, figured out that mob:checkBaseExp() is the cause and returns false if your pet does the killing and you have no enmity on the target.

Following this, the line: (lua_baseentity.cpp Line: 6227)

Code: Select all

uint32 baseexp = charutils::GetRealExp(PMob->m_HiPCLvl, PMob->GetMLevel());
Has the issue that PMob->m_HiPCLvl is 0 from the pet killing the target. This is because the pet AI does not update the targets highest PC level that was attacking it. This can be fixed with:

Code: Select all

            CMobEntity* Monster = (CMobEntity*)m_PBattleTarget;
            if (Monster->m_HiPCLvl < ((CCharEntity*)m_PPet->PMaster)->GetMLevel())
                Monster->m_HiPCLvl = ((CCharEntity*)m_PPet->PMaster)->GetMLevel();

Re: Bug #221 Fix / Patch

Posted: Mon Jun 03, 2013 4:10 pm
by PrBlahBlahtson
Looks simple enough. Examining this.

Edit:
Committed as r3448 :)