[DiscordArchive] Is there any way to set someone’s respawn based on their reputation?
[DiscordArchive] Is there any way to set someone’s respawn based on their reputation?
Archived author: Vlad • Posted: 2021-09-19T17:11:02.916000+00:00
Original source
Is there any way to set someone’s respawn based on their reputation?
Archived author: <o> • Posted: 2021-09-19T17:15:29.471000+00:00
Original source
~~All the logic is in `Player::RepopAtGraveyard`, if you still want to use WorldSafeLocs you can just override the previous `ClosestGrave` variable with your own logic before this section:~~
```
// if no grave found, stay at the current location
// and don't show spirit healer location
if (ClosestGrave)
```
~~or just rewrite the whole function~~
Archived author: <o> • Posted: 2021-09-19T17:16:16.955000+00:00
Original source
alternatively, do it in `ObjectMgr::GetClosestGraveyard` <-- do this instead to get correct grave generation
Archived author: <o> • Posted: 2021-09-19T17:16:54.199000+00:00
Original source
actually, doing it there is likely preferable because it's called from a few more places, mostly debug stuff and bgs though it seems
Archived author: Vlad • Posted: 2021-09-19T17:20:40.772000+00:00
Original source
I’ll try that when I get home, thanks
At the moment all players respawn at the main village
Archived author: Vlad • Posted: 2021-09-19T17:20:57.498000+00:00
Original source
I want to make it so people who are criminals respawn in their own area
Archived author: <o> • Posted: 2021-09-19T17:23:31.650000+00:00
Original source
should be fairly simple. I realized the GetClosestGraveyard doesn't take a player object, and as it's called from a few different places the easiest might be to just modify the logic in both `Player::RepopAtGraveyard` and `WorldSession::SendSpiritResurrect` to get that working in normal maps, or do it properly and let `ObjectMgr::GetClosestGraveyard` also take a player argument.