All pastes #575554 Raw Edit

Anonymous

public cpp v1 · immutable
·published 2007-06-19 03:00 UTC
rendered paste body
Index: src/game/ChatHandler.cpp===================================================================--- src/game/ChatHandler.cpp	(revision 413)+++ src/game/ChatHandler.cpp	(working copy)@@ -317,6 +317,7 @@ 	recv_data >> guid;  	Unit * pUnit = _player->GetMapMgr()->GetUnit(guid);+ 	if(pUnit) 	{ 		if(pUnit->IsPlayer())@@ -327,6 +328,7 @@ 		else if(pUnit->GetTypeId() == TYPEID_UNIT) 		{ 			Creature * p = static_cast<Creature*>(pUnit);+			CALL_SCRIPT_EVENT(p, OnEmote)(p, _player, text_emote); 			if(p->GetCreatureName()) 			{ 				name = p->GetCreatureName()->Name;Index: src/game/ScriptMgr.h===================================================================--- src/game/ScriptMgr.h	(revision 413)+++ src/game/ScriptMgr.h	(working copy)@@ -108,6 +108,7 @@ 	virtual void OnLoad() {} 	virtual void OnReachWP(uint32 iWaypointId, bool bForwards) {} 	virtual void OnLootTaken(Player* pPlayer, ItemPrototype *pItemPrototype) {}+	virtual void OnEmote(Creature* pCreature, Player* pPlayer, uint32 emoteId) {} 	virtual void AIUpdate() {}  	void RegisterAIUpdateEvent(uint32 frequency);Index: src/scripts/src/GossipScripts/GuardGossip.cpp===================================================================--- src/scripts/src/GossipScripts/GuardGossip.cpp	(revision 413)+++ src/scripts/src/GossipScripts/GuardGossip.cpp	(working copy)@@ -34,6 +34,11 @@ { public:     ADD_GOSSIP_FACTORY_FUNCTION(StormwindGuard);+	void OnEmote(Creature * pCreature, Player * pPlayer, uint32 emoteId)+	{+		pCreature->Emote(EMOTE_ONESHOT_BOW);+	}+     void GossipHello(Creature * pCreature, Player * Plr, bool AutoSend)     {         GossipMenu *Menu;