Jump to content

Block Elixir in Duel / PvP


Recommended Posts

Hi there,

I did this long time ago and i was thinking to share it, is not something wow but im still new in c++ and i dont really understand evrything so if u find any bugs in this system you are free to say.Search in server/game/pvp.cpp for :

Spoiler



		if (pkPVP->Agree(pkChr->GetPlayerID()))
		{


 

Add under :

Spoiler



for(int i = 0; i < INVENTORY_MAX_NUM; i++)
                        {
                            if(pkChr->GetInventoryItem(i)> 0 && pkChr->GetInventoryItem(i)->GetSocket(0) == 1 && pkChr->GetInventoryItem(i)->GetVnum() == 72723){
                                pkChr->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkChr->GetName());
                                pkChr->GetInventoryItem(i)->SetSocket(0, false);
                                pkChr->GetInventoryItem(i)->Lock(false);
                                    
                            }
                            else if(pkChr->GetInventoryItem(i)> 0 && pkChr->GetInventoryItem(i)->GetSocket(0) == 1 && pkChr->GetInventoryItem(i)->GetVnum() == 72724){
                                pkChr->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkChr->GetName());
                                pkChr->GetInventoryItem(i)->SetSocket(0, false);
                                pkChr->GetInventoryItem(i)->Lock(false);
                                    
                            }
                            else if(pkChr->GetInventoryItem(i)> 0 && pkChr->GetInventoryItem(i)->GetSocket(0) == 1 && pkChr->GetInventoryItem(i)->GetVnum() == 72725){
                                pkChr->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkChr->GetName());
                                pkChr->GetInventoryItem(i)->SetSocket(0, false);
                                pkChr->GetInventoryItem(i)->Lock(false);
                                    
                            }
                            else if(pkChr->GetInventoryItem(i)> 0 && pkChr->GetInventoryItem(i)->GetSocket(0) == 1 && pkChr->GetInventoryItem(i)->GetVnum() == 72726){
                                pkChr->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkChr->GetName());
                                pkChr->GetInventoryItem(i)->SetSocket(0, false);
                                pkChr->GetInventoryItem(i)->Lock(false);
                                    
                            }
                            else if(pkVictim->GetInventoryItem(i)> 0 && pkVictim->GetInventoryItem(i)->GetSocket(0) == 1 && pkVictim->GetInventoryItem(i)->GetVnum() == 72723)
                            {
                                pkVictim->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkVictim->GetName());
                                pkVictim->GetInventoryItem(i)->SetSocket(0, false);
                                pkVictim->GetInventoryItem(i)->Lock(false);
                                    
                            }
                            else if(pkVictim->GetInventoryItem(i)> 0 && pkVictim->GetInventoryItem(i)->GetSocket(0) == 1 && pkVictim->GetInventoryItem(i)->GetVnum() == 72724)
                            {
                                pkVictim->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkVictim->GetName());
                                pkVictim->GetInventoryItem(i)->SetSocket(0, false);
                                pkVictim->GetInventoryItem(i)->Lock(false);
                                    
                            }
                            else if(pkVictim->GetInventoryItem(i)> 0 && pkVictim->GetInventoryItem(i)->GetSocket(0) == 1 && pkVictim->GetInventoryItem(i)->GetVnum() == 72725)
                            {
                                pkVictim->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkVictim->GetName());
                                pkVictim->GetInventoryItem(i)->SetSocket(0, false);
                                pkVictim->GetInventoryItem(i)->Lock(false);
                                    
                            }
                            else if(pkVictim->GetInventoryItem(i)> 0 && pkVictim->GetInventoryItem(i)->GetSocket(0) == 1 && pkVictim->GetInventoryItem(i)->GetVnum() == 72726)
                            {
                                pkVictim->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkVictim->GetName());
                                pkVictim->GetInventoryItem(i)->SetSocket(0, false);
                                pkVictim->GetInventoryItem(i)->Lock(false);
                                    
                            }


 

Ok now we implement a function im not the author of it , the author is 


So in pvp.cpp we search for:

Spoiler



CPVPManager::~CPVPManager()
{
}
//And we add under this @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
bool CPVPManager::HasDuel(LPCHARACTER pkChar) { 
    CPVPSetMap::iterator it = m_map_pkPVPSetByID.find(pkChar->GetPlayerID()); 
     
    if (it != m_map_pkPVPSetByID.end()) { 
        itertype(it->second) it2 = it->second.begin(); 
         
        while (it2 != it->second.end()) { 
            CPVP * pvp = *it2++; 
            if (pvp->IsFight()) 
                return true; 
        } 
    } 
    return false; 
} 


 

 

In pvp.h we search this:

Spoiler

CPVP *			Find(DWORD dwCRC);
//And we add under @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
bool                    HasDuel(LPCHARACTER pkChar);

 

Now we finished with this function that helps us to check if a player is in a duel.

We open char_item.cpp and we search and add under:

Spoiler

if (CArenaManager::instance().IsArenaMap(GetMapIndex()) == true)
									{
										ChatPacket(CHAT_TYPE_INFO, LC_TEXT("대련장에서 사용하실 수 없습니다."));
										return false;
									}
//Add under this @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                                                                        LPCHARACTER ch = quest::CQuestManager::instance().GetCurrentCharacterPtr();
                                                                        if(CPVPManager::Instance().HasDuel(ch) && item->GetVnum() == 72723 || 	 CPVPManager::Instance().HasDuel(ch) && item->GetVnum() == 72724 || CPVPManager::Instance().HasDuel(ch) && item->GetVnum() == 72725 || CPVPManager::Instance().HasDuel(ch) && item->GetVnum() == 72726)
                                                                        {
                                                                        	ChatPacket(CHAT_TYPE_INFO, "%s you cannot use auto potions while you are in a duel.", ch->GetName());
										return false;    
                                                                        }

 

I think thats it,I will come later with extra code for banning other potions like normal red or blessing.

Have a nice day.

Best regards Root.

  • Metin2 Dev 4
  • Confused 1
  • Love 2
Link to comment
Share on other sites

i think thats is better:

 

int blocked_items[] = {72723,  72724, 72725, 72726};

for(size_t i = 0; i < INVENTORY_MAX_NUM; i++) {
	for (size_t id = 0; id < 4; id++) {
		if(pkChr->GetInventoryItem(i)> 0 && pkChr->GetInventoryItem(i)->GetSocket(0) == 1 && pkChr->GetInventoryItem(i)->GetVnum() == blocked_items[id]) {
			pkChr->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkChr->GetName());
			pkChr->GetInventoryItem(i)->SetSocket(0, false);
			pkChr->GetInventoryItem(i)->Lock(false);
		} else if(pkVictim->GetInventoryItem(i)> 0 && pkVictim->GetInventoryItem(i)->GetSocket(0) == 1 && pkVictim->GetInventoryItem(i)->GetVnum() == blocked_items[id]) {
			pkVictim->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkVictim->GetName());
			pkVictim->GetInventoryItem(i)->SetSocket(0, false);
			pkVictim->GetInventoryItem(i)->Lock(false);
		}
	}
}

but dont tested

 

 

looks like:

void CPVPManager::Insert(LPCHARACTER pkChr, LPCHARACTER pkVictim)
{
	if (pkChr->IsDead() || pkVictim->IsDead())
		return;
	int blocked_items[] = {72723,  72724, 72725, 72726};

	CPVP kPVP(pkChr->GetPlayerID(), pkVictim->GetPlayerID());

	CPVP * pkPVP;

	if ((pkPVP = Find(kPVP.m_dwCRC)))
	{
		// º¹¼öÇÒ ¼ö ÀÖÀ¸¸é ¹Ù·Î ½Î¿ò!
		if (pkPVP->Agree(pkChr->GetPlayerID()))
		{
			pkVictim->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s´Ô°úÀÇ ´ë°á ½ÃÀÛ!"), pkChr->GetName());
			pkChr->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s´Ô°úÀÇ ´ë°á ½ÃÀÛ!"), pkVictim->GetName());
			for(size_t i = 0; i < INVENTORY_MAX_NUM; i++) {
				for (size_t id = 0; id < 4; id++) {
					if(pkChr->GetInventoryItem(i)> 0 && pkChr->GetInventoryItem(i)->GetSocket(0) == 1 && pkChr->GetInventoryItem(i)->GetVnum() == blocked_items[id]) {
						pkChr->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkChr->GetName());
						pkChr->GetInventoryItem(i)->SetSocket(0, false);
						pkChr->GetInventoryItem(i)->Lock(false);
					} else if(pkVictim->GetInventoryItem(i)> 0 && pkVictim->GetInventoryItem(i)->GetSocket(0) == 1 && pkVictim->GetInventoryItem(i)->GetVnum() == blocked_items[id]) {
						pkVictim->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkVictim->GetName());
						pkVictim->GetInventoryItem(i)->SetSocket(0, false);
						pkVictim->GetInventoryItem(i)->Lock(false);
					}
				}
			}

		}
		return;
	}

	pkPVP = M2_NEW CPVP(kPVP);

	pkPVP->SetVID(pkChr->GetPlayerID(), pkChr->GetVID());
	pkPVP->SetVID(pkVictim->GetPlayerID(), pkVictim->GetVID());

	m_map_pkPVP.insert(map<DWORD, CPVP *>::value_type(pkPVP->m_dwCRC, pkPVP));

	m_map_pkPVPSetByID[pkChr->GetPlayerID()].insert(pkPVP);
	m_map_pkPVPSetByID[pkVictim->GetPlayerID()].insert(pkPVP);

	pkPVP->Packet();

	char msg[CHAT_MAX_LEN + 1];
	snprintf(msg, sizeof(msg), LC_TEXT("%s´ÔÀÌ ´ë°á½ÅûÀ» Çß½À´Ï´Ù. ½Â³«ÇÏ·Á¸é ´ë°áµ¿ÀǸ¦ Çϼ¼¿ä."), pkChr->GetName());

	pkVictim->ChatPacket(CHAT_TYPE_INFO, msg);
	pkChr->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s¿¡°Ô ´ë°á½ÅûÀ» Çß½À´Ï´Ù."), pkVictim->GetName());

	// NOTIFY_PVP_MESSAGE
	LPDESC pkVictimDesc = pkVictim->GetDesc();
	if (pkVictimDesc)
	{
		TPacketGCWhisper pack;

		int len = MIN(CHAT_MAX_LEN, strlen(msg) + 1);

		pack.bHeader = HEADER_GC_WHISPER;
		pack.wSize = sizeof(TPacketGCWhisper) + len;
		pack.bType = WHISPER_TYPE_SYSTEM;
		strlcpy(pack.szNameFrom, pkChr->GetName(), sizeof(pack.szNameFrom));

		TEMP_BUFFER buf;

		buf.write(&pack, sizeof(TPacketGCWhisper));
		buf.write(msg, len);

		pkVictimDesc->Packet(buf.read_peek(), buf.size());
	}	
	// END_OF_NOTIFY_PVP_MESSAGE
}

 

 

NOTE

make top of this file

#include "char_battle.cpp"

 

and all error fixxed

  • Metin2 Dev 1
Link to comment
Share on other sites

  • 10 months later...
Am 1.2.2017 um 14:39 schrieb Root:

Hi there,

I did this long time ago and i was thinking to share it, is not something wow but im still new in c++ and i dont really understand evrything so if u find any bugs in this system you are free to say.Search in server/game/pvp.cpp for :

  Unsichtbaren Inhalt anzeigen

 



		if (pkPVP->Agree(pkChr->GetPlayerID()))
		{

 

 

 

 

Add under :

  Unsichtbaren Inhalt anzeigen

 



for(int i = 0; i < INVENTORY_MAX_NUM; i++)
                        {
                            if(pkChr->GetInventoryItem(i)> 0 && pkChr->GetInventoryItem(i)->GetSocket(0) == 1 && pkChr->GetInventoryItem(i)->GetVnum() == 72723){
                                pkChr->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkChr->GetName());
                                pkChr->GetInventoryItem(i)->SetSocket(0, false);
                                pkChr->GetInventoryItem(i)->Lock(false);
                                    
                            }
                            else if(pkChr->GetInventoryItem(i)> 0 && pkChr->GetInventoryItem(i)->GetSocket(0) == 1 && pkChr->GetInventoryItem(i)->GetVnum() == 72724){
                                pkChr->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkChr->GetName());
                                pkChr->GetInventoryItem(i)->SetSocket(0, false);
                                pkChr->GetInventoryItem(i)->Lock(false);
                                    
                            }
                            else if(pkChr->GetInventoryItem(i)> 0 && pkChr->GetInventoryItem(i)->GetSocket(0) == 1 && pkChr->GetInventoryItem(i)->GetVnum() == 72725){
                                pkChr->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkChr->GetName());
                                pkChr->GetInventoryItem(i)->SetSocket(0, false);
                                pkChr->GetInventoryItem(i)->Lock(false);
                                    
                            }
                            else if(pkChr->GetInventoryItem(i)> 0 && pkChr->GetInventoryItem(i)->GetSocket(0) == 1 && pkChr->GetInventoryItem(i)->GetVnum() == 72726){
                                pkChr->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkChr->GetName());
                                pkChr->GetInventoryItem(i)->SetSocket(0, false);
                                pkChr->GetInventoryItem(i)->Lock(false);
                                    
                            }
                            else if(pkVictim->GetInventoryItem(i)> 0 && pkVictim->GetInventoryItem(i)->GetSocket(0) == 1 && pkVictim->GetInventoryItem(i)->GetVnum() == 72723)
                            {
                                pkVictim->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkVictim->GetName());
                                pkVictim->GetInventoryItem(i)->SetSocket(0, false);
                                pkVictim->GetInventoryItem(i)->Lock(false);
                                    
                            }
                            else if(pkVictim->GetInventoryItem(i)> 0 && pkVictim->GetInventoryItem(i)->GetSocket(0) == 1 && pkVictim->GetInventoryItem(i)->GetVnum() == 72724)
                            {
                                pkVictim->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkVictim->GetName());
                                pkVictim->GetInventoryItem(i)->SetSocket(0, false);
                                pkVictim->GetInventoryItem(i)->Lock(false);
                                    
                            }
                            else if(pkVictim->GetInventoryItem(i)> 0 && pkVictim->GetInventoryItem(i)->GetSocket(0) == 1 && pkVictim->GetInventoryItem(i)->GetVnum() == 72725)
                            {
                                pkVictim->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkVictim->GetName());
                                pkVictim->GetInventoryItem(i)->SetSocket(0, false);
                                pkVictim->GetInventoryItem(i)->Lock(false);
                                    
                            }
                            else if(pkVictim->GetInventoryItem(i)> 0 && pkVictim->GetInventoryItem(i)->GetSocket(0) == 1 && pkVictim->GetInventoryItem(i)->GetVnum() == 72726)
                            {
                                pkVictim->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkVictim->GetName());
                                pkVictim->GetInventoryItem(i)->SetSocket(0, false);
                                pkVictim->GetInventoryItem(i)->Lock(false);
                                    
                            }

 

 

 

 

Ok now we implement a function im not the author of it , the author is 


So in pvp.cpp we search for:

  Unsichtbaren Inhalt anzeigen

 



CPVPManager::~CPVPManager()
{
}
//And we add under this @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
bool CPVPManager::HasDuel(LPCHARACTER pkChar) { 
    CPVPSetMap::iterator it = m_map_pkPVPSetByID.find(pkChar->GetPlayerID()); 
     
    if (it != m_map_pkPVPSetByID.end()) { 
        itertype(it->second) it2 = it->second.begin(); 
         
        while (it2 != it->second.end()) { 
            CPVP * pvp = *it2++; 
            if (pvp->IsFight()) 
                return true; 
        } 
    } 
    return false; 
} 

 

 

 

In pvp.h we search this:

  Unsichtbaren Inhalt anzeigen


CPVP *			Find(DWORD dwCRC);
//And we add under @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
bool                    HasDuel(LPCHARACTER pkChar);

 

Now we finished with this function that helps us to check if a player is in a duel.

We open char_item.cpp and we search and add under:

  Unsichtbaren Inhalt anzeigen


if (CArenaManager::instance().IsArenaMap(GetMapIndex()) == true)
									{
										ChatPacket(CHAT_TYPE_INFO, LC_TEXT("대련장에서 사용하실 수 없습니다."));
										return false;
									}
//Add under this @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                                                                        LPCHARACTER ch = quest::CQuestManager::instance().GetCurrentCharacterPtr();
                                                                        if(CPVPManager::Instance().HasDuel(ch) && item->GetVnum() == 72723 || 	 CPVPManager::Instance().HasDuel(ch) && item->GetVnum() == 72724 || CPVPManager::Instance().HasDuel(ch) && item->GetVnum() == 72725 || CPVPManager::Instance().HasDuel(ch) && item->GetVnum() == 72726)
                                                                        {
                                                                        	ChatPacket(CHAT_TYPE_INFO, "%s you cannot use auto potions while you are in a duel.", ch->GetName());
										return false;    
                                                                        }

 

I think thats it,I will come later with extra code for banning other potions like normal red or blessing.

Have a nice day.

Best regards Root.

error:
char_item.cpp:3934: error: 'CPVPManager' has not been declared

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...
  • 2 weeks later...
  • 3 years later...
On 2/1/2017 at 7:58 PM, Kori said:

i think thats is better:

 

int blocked_items[] = {72723,  72724, 72725, 72726};

for(size_t i = 0; i < INVENTORY_MAX_NUM; i++) {
	for (size_t id = 0; id < 4; id++) {
		if(pkChr->GetInventoryItem(i)> 0 && pkChr->GetInventoryItem(i)->GetSocket(0) == 1 && pkChr->GetInventoryItem(i)->GetVnum() == blocked_items[id]) {
			pkChr->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkChr->GetName());
			pkChr->GetInventoryItem(i)->SetSocket(0, false);
			pkChr->GetInventoryItem(i)->Lock(false);
		} else if(pkVictim->GetInventoryItem(i)> 0 && pkVictim->GetInventoryItem(i)->GetSocket(0) == 1 && pkVictim->GetInventoryItem(i)->GetVnum() == blocked_items[id]) {
			pkVictim->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkVictim->GetName());
			pkVictim->GetInventoryItem(i)->SetSocket(0, false);
			pkVictim->GetInventoryItem(i)->Lock(false);
		}
	}
}

but dont tested

 

 

looks like:

void CPVPManager::Insert(LPCHARACTER pkChr, LPCHARACTER pkVictim)
{
	if (pkChr->IsDead() || pkVictim->IsDead())
		return;
	int blocked_items[] = {72723,  72724, 72725, 72726};

	CPVP kPVP(pkChr->GetPlayerID(), pkVictim->GetPlayerID());

	CPVP * pkPVP;

	if ((pkPVP = Find(kPVP.m_dwCRC)))
	{
		// º¹¼öÇÒ ¼ö ÀÖÀ¸¸é ¹Ù·Î ½Î¿ò!
		if (pkPVP->Agree(pkChr->GetPlayerID()))
		{
			pkVictim->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s´Ô°úÀÇ ´ë°á ½ÃÀÛ!"), pkChr->GetName());
			pkChr->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s´Ô°úÀÇ ´ë°á ½ÃÀÛ!"), pkVictim->GetName());
			for(size_t i = 0; i < INVENTORY_MAX_NUM; i++) {
				for (size_t id = 0; id < 4; id++) {
					if(pkChr->GetInventoryItem(i)> 0 && pkChr->GetInventoryItem(i)->GetSocket(0) == 1 && pkChr->GetInventoryItem(i)->GetVnum() == blocked_items[id]) {
						pkChr->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkChr->GetName());
						pkChr->GetInventoryItem(i)->SetSocket(0, false);
						pkChr->GetInventoryItem(i)->Lock(false);
					} else if(pkVictim->GetInventoryItem(i)> 0 && pkVictim->GetInventoryItem(i)->GetSocket(0) == 1 && pkVictim->GetInventoryItem(i)->GetVnum() == blocked_items[id]) {
						pkVictim->ChatPacket(CHAT_TYPE_INFO, "%s potions are banned in duel" , pkVictim->GetName());
						pkVictim->GetInventoryItem(i)->SetSocket(0, false);
						pkVictim->GetInventoryItem(i)->Lock(false);
					}
				}
			}

		}
		return;
	}

	pkPVP = M2_NEW CPVP(kPVP);

	pkPVP->SetVID(pkChr->GetPlayerID(), pkChr->GetVID());
	pkPVP->SetVID(pkVictim->GetPlayerID(), pkVictim->GetVID());

	m_map_pkPVP.insert(map<DWORD, CPVP *>::value_type(pkPVP->m_dwCRC, pkPVP));

	m_map_pkPVPSetByID[pkChr->GetPlayerID()].insert(pkPVP);
	m_map_pkPVPSetByID[pkVictim->GetPlayerID()].insert(pkPVP);

	pkPVP->Packet();

	char msg[CHAT_MAX_LEN + 1];
	snprintf(msg, sizeof(msg), LC_TEXT("%s´ÔÀÌ ´ë°á½ÅûÀ» Çß½À´Ï´Ù. ½Â³«ÇÏ·Á¸é ´ë°áµ¿ÀǸ¦ Çϼ¼¿ä."), pkChr->GetName());

	pkVictim->ChatPacket(CHAT_TYPE_INFO, msg);
	pkChr->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s¿¡°Ô ´ë°á½ÅûÀ» Çß½À´Ï´Ù."), pkVictim->GetName());

	// NOTIFY_PVP_MESSAGE
	LPDESC pkVictimDesc = pkVictim->GetDesc();
	if (pkVictimDesc)
	{
		TPacketGCWhisper pack;

		int len = MIN(CHAT_MAX_LEN, strlen(msg) + 1);

		pack.bHeader = HEADER_GC_WHISPER;
		pack.wSize = sizeof(TPacketGCWhisper) + len;
		pack.bType = WHISPER_TYPE_SYSTEM;
		strlcpy(pack.szNameFrom, pkChr->GetName(), sizeof(pack.szNameFrom));

		TEMP_BUFFER buf;

		buf.write(&pack, sizeof(TPacketGCWhisper));
		buf.write(msg, len);

		pkVictimDesc->Packet(buf.read_peek(), buf.size());
	}	
	// END_OF_NOTIFY_PVP_MESSAGE
}

 

 

NOTE

make top of this file

#include "char_battle.cpp"

 

and all error fixxed

Could you tell which files and functions need to be edited? please thanks!

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / 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.