User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 7 of 8

Thread: [C++] Dungeon And Raid Dynamic Resurrection

  1. #1
    Respected Member
    Join Date
    Sep 2013
    Location
    Lebanon,Beirut
    Posts
    120
    XP
    3,458
    Level
    17
    Thanks
    14
    Thanked 53 Times in 22 Posts

    [C++] Dungeon And Raid Dynamic Resurrection

    Hey guys so it's been a long time i didn't release something, so here i am...

    Dungeon and Raid Dynamic Player Resurrection is a simple script that add a kind of "Waypoint" when a boss in dungeon or in raid is killed so that player get Resurrected at this point if they die and release there body. this features got implemented on MOP+ by blizzard but they are static graveyard that are unlocked depending on the group progress.
    at the moment i wanted to do something really easy to understand and script and use.

    here's how it works :
    Each time someone kill a Dungeon or Raid Boss it spawn an invisible mob that will stay for 2 hours or until instance got reset. When someone die and release his body after getting atleast one spawn point he will get resurrected at the last spawn point with 70 % of his health and mana. however if no spawn point are created usual graveyard will be used.

    Since i do not have VS2015 at the moment i couldn't test it on a recent core so waiting for your replay !

    here's the Diff : https://gist.github.com/callmephil/6...4b6f05b6369287
    here's a video preview :


    No SQL is Required unless you decide to change the spawn point entry wich is actually (1).

    PS : Stay in touch new release based on this for world PvP and World Questing is coming !
    Last edited by callmephil; 10-15-2016 at 03:08 PM.
    Achievements:
    1 year registered Member Level XV

  2. The Following 2 Users Say Thank You to callmephil For This Useful Post:


  3. #2
    Moderator / Eluna Dev <span style='color: #FF0000'><span class='glow_8B0000'>Rochet2</span></span>'s Avatar
    Join Date
    Apr 2013
    Location
    Finland
    Posts
    1,799
    XP
    12,981
    Level
    34
    Thanks
    95
    Thanked 565 Times in 393 Posts
    I would not be so sure this builds on linux.
    It seems you do not declare Player or include other files that declare or define it and you use it in DynamicResurrection.h and DynamicResurrection.cpp and so on.
    Same for sMapStore and so.

    VS is very forgiving when it comes to stuff like this so Im sure it compiles on VS though.

    Travis is easy to set up to test your stuff on TC for linux : )
    Awards:
    Support LOL Scripter Facepalm! Raffle Winner
    rochet2.github.io - Home of great codes

  4. #3
    Original Poster
    Respected Member
    Join Date
    Sep 2013
    Location
    Lebanon,Beirut
    Posts
    120
    XP
    3,458
    Level
    17
    Thanks
    14
    Thanked 53 Times in 22 Posts
    Quote Originally Posted by Rochet2 View Post
    I would not be so sure this builds on linux.
    It seems you do not declare Player or include other files that declare or define it and you use it in DynamicResurrection.h and DynamicResurrection.cpp and so on.
    Same for sMapStore and so.

    VS is very forgiving when it comes to stuff like this so Im sure it compiles on VS though.

    Travis is easy to set up to test your stuff on TC for linux : )
    Thanks for poiting this out, i made some modifications it should works now.

  5. #4
    Exalted Member Sylica's Avatar
    Join Date
    Aug 2014
    Location
    My Own Little World
    Posts
    124
    XP
    1,264,322
    Level
    196
    Thanks
    9
    Thanked 26 Times in 19 Posts
    Looks like a nice script you have here, and works nicely. Yes, this script works for Unix, with some warnings depending on GCC version. Hope to see some more scripts in the near future.

    Best of luck.
    Achievements:
    1 year registered Level XL Level C

    Project Firestorm 2015 - 2016

    Those you help, will help you back in return. --Sylica

  6. #5
    Original Poster
    Respected Member
    Join Date
    Sep 2013
    Location
    Lebanon,Beirut
    Posts
    120
    XP
    3,458
    Level
    17
    Thanks
    14
    Thanked 53 Times in 22 Posts
    Quote Originally Posted by Sylica View Post
    Looks like a nice script you have here, and works nicely. Yes, this script works for Unix, with some warnings depending on GCC version. Hope to see some more scripts in the near future.

    Best of luck.
    Thanks for the motivating comment, let me know if have to modify stuff for Unix Warnings, i'm lightly working and so much new features but i have only restricted free time.

  7. #6
    Moderator / Eluna Dev <span style='color: #FF0000'><span class='glow_8B0000'>Rochet2</span></span>'s Avatar
    Join Date
    Apr 2013
    Location
    Finland
    Posts
    1,799
    XP
    12,981
    Level
    34
    Thanks
    95
    Thanked 565 Times in 393 Posts
    Disclaimer: I did not compile the code or anything

    is there a typo here?
    C_Resurrection_ENTRY
    C_RESURECTION_ENTRY

    I think the warnings come from unused creature variables you have.
    And from the double to float conversion from 0.7, need to use 0.7f if float is needed.

    You should probably move
    + static Dynamic_Resurrection* instance()
    + {
    + static Dynamic_Resurrection instance;
    + return &instance;
    + }
    into the .cpp file. There are reasons why TC did it to all their singletons.
    You can look example from ObjectMgr.h and cpp for the instance member function.
    See this commit for more info: https://github.com/TrinityCore/Trini...ab5c6dc7bbbdd1

    Also, while I am at it, you can probably change this sMapStore.LookupEntry(player->GetMapId())->Instanceable() to this player->GetMap()->Instanceable() for faster check, though the benefit is negligible. .. but it may save you from a crash possibly.
    Last edited by Rochet2; 10-16-2016 at 01:10 PM.
    Awards:
    Support LOL Scripter Facepalm! Raffle Winner
    rochet2.github.io - Home of great codes

  8. The Following User Says Thank You to Rochet2 For This Useful Post:


  9. #7
    Original Poster
    Respected Member
    Join Date
    Sep 2013
    Location
    Lebanon,Beirut
    Posts
    120
    XP
    3,458
    Level
    17
    Thanks
    14
    Thanked 53 Times in 22 Posts
    Quote Originally Posted by Rochet2 View Post
    Disclaimer: I did not compile the code or anything

    is there a typo here?
    C_Resurrection_ENTRY
    C_RESURECTION_ENTRY

    I think the warnings come from unused creature variables you have.
    And from the double to float conversion from 0.7, need to use 0.7f if float is needed.

    You should probably move


    into the .cpp file. There are reasons why TC did it to all their singletons.
    You can look example from ObjectMgr.h and cpp for the instance member function.
    See this commit for more info: https://github.com/TrinityCore/Trini...ab5c6dc7bbbdd1

    Also, while I am at it, you can probably change this sMapStore.LookupEntry(player->GetMapId())->Instanceable() to this player->GetMap()->Instanceable() for faster check, though the benefit is negligible. .. but it may save you from a crash possibly.
    Thanks i applied those modifications i will test and push them tomorrow !

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •