Modcraft - The community dedicated to quality WoW modding!
Wrath of the Lich King Modding => Serverside Modding => Topic started by: Kobiesan on June 01, 2016, 07:07:14 am
-
Hello. Does anyone know where within TrinityCore's source files that mounts are called upon and are responsible for dismounting people who are in combat if they are mounted? I need to make it so only a certain class doesn't get dismounted when they enter combat on a mount.
-
No idea, but I would recommend looking not just into core src, but also into mount spell data. And doing this just for a certain class... bleh, quite likely you will have to make excluse class-only combat mounts. Maybe not, it just a guess.
-
One way to try find out:
Start debugging.
Add break point to dismount function or whatever handles dismounting.
Mount up.
Get in combat.
See the callstack to that breakpoint when it is hit.
Not sure how you can see the callstack in GDB, but in VS it should be available.
-
No idea, but I would recommend looking not just into core src, but also into mount spell data. And doing this just for a certain class... bleh, quite likely you will have to make excluse class-only combat mounts. Maybe not, it just a guess.
I was in the middle of remaking every single mount in spell.dbc but it was taking a long time and I figured it would work better and be faster to just change the source of dismounts.
Mounts have a spellmechanic.dbc value of 21 (mounted). An AttributeEx3 of 0x20000000 (Ignore caster spellpower and done damage mods? client doesn't apply spellmods for those spells) which I don't think affects dismounts. And an AttributeEx6 flag of 0x20000 (mount spell). I think that one might have something to do with it but I'm not sure where to look.
One way to try find out:
Start debugging.
Add break point to dismount function or whatever handles dismounting.
Mount up.
Get in combat.
See the callstack to that breakpoint when it is hit.
Not sure how you can see the callstack in GDB, but in VS it should be available.
I'm not sure how to do the debugging or break point.
-
One way to try find out:
Start debugging.
Add break point to dismount function or whatever handles dismounting.
Mount up.
Get in combat.
See the callstack to that breakpoint when it is hit.
Not sure how you can see the callstack in GDB, but in VS it should be available.
I'm not sure how to do the debugging or break point.
Try following this:
viewtopic.php?p=48539#p48539 (http://modcraft.io/viewtopic.php?p=48539#p48539" onclick="window.open(this.href);return false;)
-
One way to try find out:
Start debugging.
Add break point to dismount function or whatever handles dismounting.
Mount up.
Get in combat.
See the callstack to that breakpoint when it is hit.
Not sure how you can see the callstack in GDB, but in VS it should be available.
I'm not sure how to do the debugging or break point.
Try following this:
viewtopic.php?p=48539#p48539 (http://modcraft.io/viewtopic.php?p=48539#p48539" onclick="window.open(this.href);return false;)
Alright, I'll give that a look.
But where can I find the dismount function?
-
Type dismount to the solution explorer.
Or search dismount from the Unit.h, Player.h, and .cpp respectively.
Or use notepad++ to search from files (whole source). Or use VS's search features for the same thing.
http://i.imgur.com/ROQ546P.png (http://i.imgur.com/ROQ546P.png" onclick="window.open(this.href);return false;)
http://i.imgur.com/wqnLl9q.png (http://i.imgur.com/wqnLl9q.png" onclick="window.open(this.href);return false;)
http://i.imgur.com/gMUGraw.png (http://i.imgur.com/gMUGraw.png" onclick="window.open(this.href);return false;)