All pastes #1363619 Raw Edit

FluxPvpHonorGains.cpp

public cpp v1 · immutable
#1363619 ·published 2009-03-17 19:02 UTC
rendered paste body
/* * FluxScripts: Scripts for Arcemu WoW Server * Copyright (C) 2009 Robert Veitch <http://fluxflashor.net/> * * This program is not free software. You may not distribute it * and/or modify it without permission from its author. * * This program is distributed in the hope it will be useful, * but WITHOUT ANY WARRANTY. This means if it deletes sys32 * I cannot be held accountable. * * Theres no license, although I should probably write one * someday for my FluxScripts. *//* * A little bit about this: * Everyone loves easy leveling amirite? Well now people can level up by * killing other players, in battleground and world pvp. * Kinda like Warhammer, but hey that was fun leveling with PVP */#include "StdAfx.h"#include "Setup.h"void OnHonorableKill(Player* plr){	uint32 currentxp = plr->GetUInt32Value(PLAYER_NEXT_LEVEL_XP);	uint32 xptogrant = currentxp * 0.01;	if(!currentxp)	{		plr->BroadcastMessage("[SERVER]: Var (currentxp) in file (PvpHonorGains.cpp) not set!!"); 	}	else	{		plr->BroadcastMessage("[SERVER]: Var (currentxp) in file (PvpHonorGains.cpp) is set!! Value: %s", currentxp);		if(!xptogrant)		{			plr->BroadcastMessage("[SERVER]: Var (xptogrant) in file (PvpHonorGains.cpp) is not set!! Calculation Error!!");		}		else		{			plr->BroadcastMessage("[SERVER]: Var (xptogrant) in file (PvpHonorGains.cpp) is set!! Value: %s", xptogrant);			plr->SetUInt32Value(PLAYER_XP, xptogrant);		}	}}void SetupPvpHonorGains(ScriptMgr *mgr){	mgr->register_hook(SERVER_HOOK_EVENT_ON_HONORABLE_KILL, &OnHonorableKill);}