Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Fallen
« on: December 26, 2009, 05:28:06 am »

Difficulty ~ Easy ~ 1/10

How to Enable *Party other Faction players* MOD
=====================================
File: ServiceLoader.cpp
_______________________________________________________________________
Find { ============================================================= }
   if ( pResPlayer->GetlFaction() != pAimPlayer->GetlFaction() )
   {
      MSG_TIP msg_tip;
      msg_tip.Head.usSize = sizeof(MSG_TIP);
      msg_tip.Head.usType = _MSG_TEAM_TIP;
      wmemset( msg_tip.chName, 0 ,64);
      wmemset( msg_tip.tip, 0 ,128);
      std::wstring   buf = L"\0";
      std::wcsncpy(msg_tip.chName, buf.c_str(), buf.length() );
      buf = L"¶Ô·½ºÍÄã²»ÊÇÏàͬµÄÕóÓ";
      std::wcsncpy(msg_tip.tip, buf.c_str(), buf.length());
      pPlayer->s_World->SendMsgToClient( &msg_tip, pResPlayer->GetSocket() );
      return NO_MSG_ERRO;
   }
Replace { =========================================================== }
   if ( pResPlayer->GetlFaction() == pAimPlayer->GetlFaction() ) // This might work
   {
      MSG_TIP msg_tip;
      msg_tip.Head.usSize = sizeof(MSG_TIP);
      msg_tip.Head.usType = _MSG_TEAM_TIP;
      wmemset( msg_tip.chName, 0 ,64);
      wmemset( msg_tip.tip, 0 ,128);
      std::wstring   buf = L"\0";
      std::wcsncpy(msg_tip.chName, buf.c_str(), buf.length() );
      buf = L"¶Ô·½ºÍÄã²»ÊÇÏàͬµÄÕóÓ";
      std::wcsncpy(msg_tip.tip, buf.c_str(), buf.length());
      pPlayer->s_World->SendMsgToClient( &msg_tip, pResPlayer->GetSocket() );
      return NO_MSG_ERRO;
   }
_______________________________________________________________________

if(1) would work too :D
~~~~~~~~~~~~~Its not tested yet !~~~~~~~~~~~~~~
Also, this might be just a string report to the client.In the other hand this could also mean that the client accepts string commands from the server instead of functions, in that case the above mod should work!