This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [TC] Removing dismount on combat?  (Read 1360 times)

Kobiesan

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 161
    • View Profile
[TC] Removing dismount on combat?
« 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Amaroth

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1219
    • View Profile
    • Amaroth's Tools
Re: [TC] Removing dismount on combat?
« Reply #1 on: June 01, 2016, 09:48:42 am »
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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

Want to support me for my releases and/or tutorials? You can send donation via Paypal to:
jantoms@seznam.cz

Rochet2

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 59
    • View Profile
    • http://rochet2.github.io/
Re: [TC] Removing dismount on combat?
« Reply #2 on: June 01, 2016, 06:26:18 pm »
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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kobiesan

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 161
    • View Profile
Re: [TC] Removing dismount on combat?
« Reply #3 on: June 01, 2016, 08:11:56 pm »
Quote from: "Amaroth"
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.

Quote from: "Rochet2"
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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Rochet2

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 59
    • View Profile
    • http://rochet2.github.io/
Re: [TC] Removing dismount on combat?
« Reply #4 on: June 01, 2016, 09:02:08 pm »
Quote from: "Kobiesan"
Quote from: "Rochet2"
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
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kobiesan

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 161
    • View Profile
Re: [TC] Removing dismount on combat?
« Reply #5 on: June 01, 2016, 09:08:40 pm »
Quote from: "Rochet2"
Quote from: "Kobiesan"
Quote from: "Rochet2"
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

Alright, I'll give that a look.

But where can I find the dismount function?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Rochet2

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 59
    • View Profile
    • http://rochet2.github.io/
Re: [TC] Removing dismount on combat?
« Reply #6 on: June 01, 2016, 09:15:21 pm »
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/wqnLl9q.png
http://i.imgur.com/gMUGraw.png
« Last Edit: January 01, 1970, 01:00:00 am by Admin »