Adding Cure to Light Elemental

Post Reply
bluesolarflare
Posts: 127
Joined: Wed May 27, 2015 4:23 pm

Adding Cure to Light Elemental

Post by bluesolarflare » Tue Sep 15, 2015 1:20 am

I tried to change the light elemental casting regen to cure by changing the spellID in the core from 108 to 2, however, the game crashes when the elemental begins casting (it never finishes)

Is there any reason why it crashes?

User avatar
kjLotus
Lead Developer
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Adding Cure to Light Elemental

Post by kjLotus » Tue Sep 15, 2015 1:57 am

have you tried reading the message from visual studio when it crashes?

bluesolarflare
Posts: 127
Joined: Wed May 27, 2015 4:23 pm

Re: Adding Cure to Light Elemental

Post by bluesolarflare » Tue Sep 15, 2015 9:02 am

I'll post the error in a bit. Basically I was able to get past the first bit which was an issue with cure enmity not extending to the light spirit. There was a one line of code battle utils that called for a debug break if the user wasn't a player so I commented that out but now the crash happens due to something with a tree in the connect server so I'll post that.

bluesolarflare
Posts: 127
Joined: Wed May 27, 2015 4:23 pm

Re: Adding Cure to Light Elemental

Post by bluesolarflare » Tue Sep 15, 2015 2:13 pm

When I debug, I get an Unhandled exception in Visual Studio

The failure points to xtree

Code: Select all

_Nodeptr& _Lmost() const
     {   // return leftmost node in nonmutable tree
      return (this->_Left(this->_Myhead));
The last line is where it failed

User avatar
kjLotus
Lead Developer
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Adding Cure to Light Elemental

Post by kjLotus » Tue Sep 15, 2015 6:08 pm

you'd want to check the call stack for a line that's actually in dsp's source instead of the STL, since it's more likely a fault of DSP's code than microsofts :)

also which exception is useful information as well

bluesolarflare
Posts: 127
Joined: Wed May 27, 2015 4:23 pm

Re: Adding Cure to Light Elemental

Post by bluesolarflare » Tue Sep 15, 2015 6:27 pm

This is what I got on my last attempt:

The thread 0x1574 has exited with code 0 (0x0).
Unhandled exception at 0x012F51E6 in DSGame-server.exe: 0xC0000005: Access violation reading location 0x28BA5F70.

This was in the call stack

DSGame-server.exe!battleutils::GenerateCureEnmity(CBattleEntity * PSource, CBattleEntity * PTarget, unsigned short amount) Line 3554 C++
DSGame-server.exe!CLuaBaseEntity::updateEnmityFromCure(lua_State * L) Line 6159 C++
DSGame-server.exe!Lunar<CLuaBaseEntity>::thunk(lua_State * L) Line 173 C++
lua51.dll!6740266f() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for lua51.dll]
DSGame-server.exe!CMagicState::FinishSpell() Line 668 C++
DSGame-server.exe!CAIPetDummy::ActionMagicFinish() Line 1062 C++
DSGame-server.exe!CAIPetDummy::ActionMagicCasting() Line 1052 C++
DSGame-server.exe!CAIPetDummy::CheckCurrentAction(unsigned int tick) Line 106 C++
DSGame-server.exe!CZoneEntities::ZoneServer(unsigned int tick) Line 940 C++
DSGame-server.exe!CZone::ZoneServer(unsigned int tick) Line 791 C++
DSGame-server.exe!zone_server(unsigned int tick, CTaskMgr::CTask * PTask) Line 81 C++
DSGame-server.exe!CTaskMgr::DoTimer(unsigned int tick) Line 71 C++
DSGame-server.exe!main(int argc, char * * argv) Line 251 C++

User avatar
kjLotus
Lead Developer
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Adding Cure to Light Elemental

Post by kjLotus » Tue Sep 15, 2015 6:59 pm

ah, that's why they don't cast cure then right now, because updateEnmityFromCure only processes if the *target* is a PC (instead of the caster, which it should be). So the pet goes into a function that expects a character, and pretty bad things happen. Interesting though, that also means that a player healing a pet generates zero enmity.

I'll change it in a bit, see what happens

bluesolarflare
Posts: 127
Joined: Wed May 27, 2015 4:23 pm

Re: Adding Cure to Light Elemental

Post by bluesolarflare » Tue Sep 15, 2015 7:05 pm

Awesome! Thanks

User avatar
kjLotus
Lead Developer
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Adding Cure to Light Elemental

Post by kjLotus » Tue Sep 15, 2015 7:24 pm


bluesolarflare
Posts: 127
Joined: Wed May 27, 2015 4:23 pm

Re: Adding Cure to Light Elemental

Post by bluesolarflare » Wed Sep 16, 2015 9:39 am

Thanks worked like a charm. Now I can attempt to mess around with puppetmaster AI

Post Reply