GM Mode 2 - Mobs stay hostile, do 1 dmg

Details:

A little something I wrote for testing mob damage, reactive procs and such. With the standard

“GM On”, mobs go neutral and won’t fight you so it makes it tough to check their damage or to

test reactive procs.

This new mode, accessed by typing “gm on2” or “gm off2” (without quotes) simply reduces all

incoming damage to 1. The actual damage is still shown on your portrait so if you’re tweaking

damage values you can see how much is actually being done.

ToDo:

  1. Remove my name from the comments

  2. Add in-game “help” details

Updated 05-03-2011


Note: Requires core 11802+

wouldn’t it be better to use something like:

.gm2 on

.gm2 off

…?

http://old.wowhead.com/spell=1908

Use this spell and modify hp (if needed) and you’re ready to go

From a usability standpoint yes but from a code standpoint, no. The

handler already exists for the “gm” related commands so rather than

write a whole new one, it was easier just to add a new parameter option.

Yes but that sometimes grabs heal aggro from nearby mobs which I found

to be a little annoying.

Why would you do this? patches should be applied before cmake, not after.

I just have to say 1 word: lol!

Doesn’t work properly… you can’t turn it off,

What difference does it make? I made the changes after CMake had done its

thing. I don’t know how to do it otherwise.*

Ok, if it’s wrong then why not explain how to do it properly?

  • Before I get flamed too much, I did ask in the past how patching works with CMake and

GIT due to the separate build / source folders without any results. Would it be possible

for someone who knows what they’re doing to write a wiki page about how to properly create

a patch?

What rev.? Works fine for me with “.gm off2”

any changes you would make to the vcproj files should be made in the cmakelist.txt files instead, but, looking through your patch, I don’t see anything that would require it to be done after cmake is run (cmake doesn’t change anything at all in the source directories)

Ok, that was a bit of confusion on my part. I assumed since I created it after running CMake that

it had to be applied after running CMake.

Thanks for explaining that bit about the vcproj changes. I was wondering how to handle the unversioned

files that get created with the secondary “build” directory.

As I mentioned before, I’m still fumbling my way through GIT and CMake. Thanks again.


{ "player", 		SEC_MODERATOR,  	false, &HandleGMPlayerCommand,        	"", NULL },

//Enable\Disable Player Mode

	static bool HandleGMPlayerCommand(ChatHandler* handler, const char* args)

	{

    	std::string argstr = (char*)args;

    	if (argstr == "on")

    	{

        	handler->GetSession()->GetPlayer()->setFaction(66604);

        	handler->GetSession()->SendNotification("Player Mode ON");

        	return true;

    	}

    	if (argstr == "off")

    	{

        	handler->GetSession()->GetPlayer()->setFaction(1);

        	handler->GetSession()->SendNotification("Player Mode OFF");

        	return true;

    	}

    	handler->SendSysMessage(LANG_USE_BOL);

    	handler->SetSentErrorMessage(true);

    	return false;

	}

This is my small Player mode /emoticons/default_wink.png