1.13c death gold penalty/tax

This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.

Moderators: Nefarius, Havvoric

Post Reply
User avatar
rondel123
Junior Member
Paladin
Posts: 109
Joined: Mon Sep 06, 2010 3:59 am
Location: Slovakia

1.13c death gold penalty/tax

Post by rondel123 » Mon Feb 09, 2015 7:54 pm

How to remove the gold penalty from stash when character dies?

Thank you for answers.

lolet
Posts: 95
Joined: Sat Sep 04, 2010 8:43 pm

Re: 1.13c death gold penalty/tax

Post by lolet » Tue Feb 10, 2015 6:03 pm

Here's code for 1.13d/1.11b. Simply nop DEATH_ApplyGoldPenalty

Code: Select all

// 1.13d: D2GAME.6FCBA780(UnitAny *pKiller<eax>, UnitAny *pVictim<ecx>, Game *pGame<ebx>)
// 1.11b: D2GAME.6FC9F620
void DEATH_ApplyPenalties(Game * pGame, UnitAny* pKiller, UnitAny* pVictim)
{
  MonsterData *pMonsterData; // edi@4
  AiGeneral *pAi; // eax@5
  Game *ptGame; // ecx@6
  UnitAny *pKillerOwner; // eax@7

  DEATH_ApplyGoldPenalty(pVictim, pGame, pKiller); //0x6FCBA560
  if ( !pKiller || pKiller->dwType  &&
    (pKiller->dwType != UNIT_MONSTER
     || (pMonsterData = pKiller->pMonsterData) == 0
     || (pAi = pMonsterData->pAiGeneral) == 0
     || pAi->pGame == 0
     || (pKillerOwner = UNIT_Find(pAi->pGame, pAi->OwnerGUIDEq, pAi->eOwnerTypeEq)) == 0
     || pKillerOwner->dwType != UNIT_PLAYER))
    DEATH_ApplyExpPenalty(pGame, pVictim); //0x6FCB94F0
}

User avatar
rondel123
Junior Member
Paladin
Posts: 109
Joined: Mon Sep 06, 2010 3:59 am
Location: Slovakia

Re: 1.13c death gold penalty/tax

Post by rondel123 » Wed Jul 01, 2015 7:49 pm

Tried this on 1.13d. It causes error and game crash.

Also, I need it for 1.13c.

User avatar
rondel123
Junior Member
Paladin
Posts: 109
Joined: Mon Sep 06, 2010 3:59 am
Location: Slovakia

Re: 1.13c death gold penalty/tax

Post by rondel123 » Tue Jul 21, 2015 2:25 pm

bump

User avatar
rondel123
Junior Member
Paladin
Posts: 109
Joined: Mon Sep 06, 2010 3:59 am
Location: Slovakia

Re: 1.13c death gold penalty/tax

Post by rondel123 » Wed Sep 30, 2015 12:14 am

Still looking for solution for 1.13c

User avatar
Necrolis
Senior Admin
Throne
Posts: 9125
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
Contact:
South Africa

Hand-picked

Re: 1.13c death gold penalty/tax

Post by Necrolis » Wed Sep 30, 2015 12:39 am

How did you NOP it out? smells like you didn't remove the push for the arguments.
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

User avatar
devurandom
Forum Regular
Angel
Posts: 897
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: 1.13c death gold penalty/tax

Post by devurandom » Wed Sep 30, 2015 1:31 am

This worked for me, no crash no death penalty tax
offsets will be different for 1.13c but opcodes will probably be identical.

Code: Select all

========================
Remove Death gold penalty tax

[1.13d] D2Game.9A784

Change:

03B4A780    56            PUSH ESI
03B4A781    57            PUSH EDI
03B4A782    8BF8          MOV EDI,EAX
03B4A784    57            PUSH EDI
03B4A785    8BF1          MOV ESI,ECX
03B4A787    53            PUSH EBX
03B4A788    E8 D3FDFFFF   CALL 03B4A560

To:

03B4A780    56            PUSH ESI
03B4A781    57            PUSH EDI
03B4A782    8BF8          MOV EDI,EAX
03B4A784    90            NOP
03B4A785    90            NOP
03B4A786    90            NOP
03B4A787    90            NOP
03B4A788    90            NOP
03B4A789    90            NOP
03B4A78A    90            NOP
03B4A78B    90            NOP
03B4A78C    90            NOP
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..

User avatar
rondel123
Junior Member
Paladin
Posts: 109
Joined: Mon Sep 06, 2010 3:59 am
Location: Slovakia

Re: 1.13c death gold penalty/tax

Post by rondel123 » Wed Sep 30, 2015 2:13 am

Yes! Thank you devurandom :)

If anyone will be interested in the future, here is code and what to do for 1.13c:

Code: Select all

Change:

6FC583A0   56               PUSH ESI
6FC583A1   57               PUSH EDI
6FC583A2   8BF8             MOV EDI,EAX
6FC583A4   57               PUSH EDI
6FC583A5   8BF1             MOV ESI,ECX
6FC583A7   53               PUSH EBX
6FC583A8   E8 D3FDFFFF      CALL D2Game.6FC58180

To:

6FC583A0   56               PUSH ESI
6FC583A1   57               PUSH EDI
6FC583A2   8BF8             MOV EDI,EAX
6FC583A4   90               NOP
6FC583A5   90               NOP
6FC583A6   90               NOP
6FC583A7   90               NOP
6FC583A8   90               NOP
6FC583A9   90               NOP
6FC583AA   90               NOP
6FC583AB   90               NOP
6FC583AC   90               NOP

User avatar
devurandom
Forum Regular
Angel
Posts: 897
Joined: Sat Mar 07, 2015 9:07 pm
United States of America

Re: 1.13c death gold penalty/tax

Post by devurandom » Wed Sep 30, 2015 3:31 am

Thanks to Lolet and Necrolis

Cheers!
:beer:
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin

Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..

User avatar
weili0677
Posts: 8
Joined: Tue Dec 14, 2021 5:46 am
China

Re: 1.13c death gold penalty/tax

Post by weili0677 » Thu Mar 17, 2022 4:06 am

mark....thanks
My English is very pool.

Post Reply

Return to “Code Editing”