Jump to content

Hard vanilla concept


Recommended Posts

Hi, im new to this forum, I reached it looking to do some experiments with vanilla, I have a little experience as programmer and i want to do a special server for me and some friends.

 

My idea is to do a permadead server with no chat, just say and yell must work.

I was looking over the code and i find some interesting sections but i want to ask the gods, you, if my hints are right.

First I find in corpse.cpp a the line that determines the distance for corpse reclaiming, so I guess I can change that distance for a negative value to make it impossible to reach.

About the spirit healer stuff i find a line in spellmgr.cpp and i assume this controls the resurrection by spirit healer, but i dont know how it works.

The issue with the spirit healer can be do in different ways, my other idea is to spawn it below the floor in order to make people unable to use it.

About the chat I found some archives, i cant find how /say and /yell works but i found some lines about trade, city and that kind of global chat i dont want in the server. As I said I just want /say and /yell, no guild chat, no trade, no general, no nothing in order to make it more realistic, because dead people cant talk.

In short, i want to make resurrection only available from other player spells or reincarnation/soulstone and i dont want chat further than as far voice can reach, meaning voice /yell

Do you think this is possible?

Thank you for reading, im waiting for your answers and thank you for this incredible project to the MaNGOS team ;)

Link to post
Share on other sites

I believe a better way to do this must be implemented at the protocol level. For example, when player hits the "Reclaim Corpse" button, the client sends to the server CMSG_RECLAIM_CORPSE opcode. As defined in Opcodes.cpp, it will be handled in

void WorldSession::HandleReclaimCorpseOpcode(WorldPacket& recv_data)

To prevent corpse reclaiming, you could just return at the start of that method, preferably since the packet is read. A drawback is that the player will be seeing/getting the menu with that button; the same holds for your proposed method. Perhaps a more subtle and cleaner way would be mangling with the SMSG update object packet sending, but it's much more complicated. Also you need to check any method if it prevents legitimate resurrection by spell.

Similarly, at player chat, client sends CMSG_MESSAGECHAT packet handled in WorldSession::HandleMessagechatOpcode(WorldPacket& recv_data). You could implement the chat filtering here by the chat type. See `enum ChatMsg` in SharedDefines.h. Looks like you need to disable many chat types, particularly everything related to the CHANNEL in enum ChatMsg.

The spirit healer interaction creates CMSG_SPIRIT_HEALER_ACTIVATE packet, though I'm unsure if there is nothing more to it. For example, WotLK spirit healer pulses (do not requiring player interaction other than getting in range) are handled in a different way. However, it may be easier this time just change the spirit healer NPC unit flags in the world DB (creature_template.UnitFlags, add UNIT_FLAG_NOT_SELECTABLE; do not forget to reset the client cache after this).

Edited by Olion
typing errors
  • Like 1
Link to post
Share on other sites

Thanks Olion.

I like your solution of filtering the channels in chat, I think its easier and more stable than removing them.

I see the resurrection matter is the most complicated.

Maybe a cleaner way to manage the resurrection is simply to avoid the player release the spirit from the corpse. After all there is no point in ghost mode if you cant do nothing being a ghost, with this solution i avoid to deal with every situation in ghost mode and they can be resurrected by player spells and jumper cables.

What do you think about this?

Link to post
Share on other sites
8 hours ago, Themas said:

Maybe a cleaner way to manage the resurrection is simply to avoid the player release the spirit from the corpse.

IIRC it is the only way to allow resurrection by other players. Also it is an even better way, but you will need to handle both ones properly. There are lots of situations involving dead and ghosts. For example:

  • logout in dead state. At next logon the spirit is free. Perhaps you manage to create that "corpse with spirit unreleased" thing instead;
  • the same but in dungeon at logon since dungen save expired, so there is no place to create that "corpse with spirit unreleased".
Link to post
Share on other sites
On 12/22/2020 at 8:45 AM, Olion said:

IIRC it is the only way to allow resurrection by other players. Also it is an even better way, but you will need to handle both ones properly. There are lots of situations involving dead and ghosts. For example:

  • logout in dead state. At next logon the spirit is free. Perhaps you manage to create that "corpse with spirit unreleased" thing instead;
  • the same but in dungeon at logon since dungen save expired, so there is no place to create that "corpse with spirit unreleased".

Finally I managed to avoid players resurrect by reclaiming corpse or spirit healer, but can still being resurrected by player spells.

I do it removing some of opcodes and voids over the code.  The problem is they can resurrect if they die inside a instance just going through the instance portal :(

I noticed players can only reclaim their corpses in the instance they died, so I assume there is a "flag" or any kind of marker associated to it, and maybe removing, or avoiding they get it is the way to meet my goal.

What is the part of the code associated with that?

Another thing I want is to remove the interaction with the spirit healer, or at least remove the button of its menu. But I can deal with some useless buttons for now, my first goal is avoid resurrecting entering instances.

Thank you again :)

Edited by Themas
Link to post
Share on other sites
9 hours ago, Elmsroth said:

@Themas The final goal is that once you are dead you cannot play anymore ? is that right ?

If so the most easy way would be to kick the player if he is dead then delete its character... 

It would be an easier modification and it handles every cases :)

The final goal is players just can be resurrected by other players or their own spells like soulstone/reincarnate, also i want to make a 15 minutes limit  to simulate body rot, then their bodies turn in to bones and cannot play anymore.

The other goal is remove the chat, just /s and /yell must work.

I want to do a kind of "realistic" server

Edited by Themas
Link to post
Share on other sites
20 hours ago, Themas said:

The problem is they can resurrect if they die inside a instance just going through the instance portal

You could prevent entering into a new map (not the first login changing player's Map* from null to something!) to a player in dead state. It is easy enough, just do not forget to handle the ships/zeppelins. Or, disable dungeon portal usage to the dead instead.

However, you need to check the dungeon binding mechanic. A player who died in a dungeon, needs a friend to get resurrection. The friend should enter the same dungeon instance. I do not remember if a dead player may invite anyone to the group, allowing access to his dungeon instance that way. Especially, what happens, if the friend is bound to the own instance of the same dungeon map.

Perhaps you have to prevent any spirit movement as well, sticking it to the corpse place.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use