[Release] Little fix ONEKILL

02/06/2014 19:42 SourceShop#1
Hello,

Here's a small fix for the Onekill mode.

Open ActionMoverMsg.cpp, look function :
Code:
int		CActionMover::ProcessActMsg1( CMover* pMover,  OBJMSG dwMsg, i
Search:
Code:
#ifdef __WORLDSERVER
			if( m_dwAtkFlags == 0 ) 
			{
				if( pMover->GetAttackResult( pHitObj, dwOption ) )
					m_dwAtkFlags = AF_GENERIC;
				else
					m_dwAtkFlags = AF_MISS;
			}
#else
			m_dwAtkFlags = AF_GENERIC;
#endif
Replace by:
Code:
#ifdef __WORLDSERVER
			if( m_dwAtkFlags == 0 ) 
			{
#ifdef __FIX_ONEKILL
				if( pMover->IsMode( ONEKILL_MODE ) && !pMover->IsAuthHigher( AUTH_GAMEMASTER ) )
				{
					m_dwAtkFlags = AF_MISS;
				}
				else
				{
#endif// __FIX_ONEKILL
					if( pMover->GetAttackResult( pHitObj, dwOption ) )
						m_dwAtkFlags = AF_GENERIC;
					else
						m_dwAtkFlags = AF_MISS;
#ifdef __FIX_ONEKILL
				}
#endif// __FIX_ONEKILL
			}
#else
			m_dwAtkFlags = AF_GENERIC;
#endif
And define in versioncommon:

Code:
#define __FIX_ONEKILL
Thanks you !
02/07/2014 18:49 Mognakor#2
This probably bugs Red Meteonyker's onehit attack.
02/07/2014 18:55 Chriѕ#3
Quote:
Originally Posted by Mognakor View Post
This probably bugs Red Meteonyker's onehit attack.
It doesn't. This is already a long time public. (GoH Source)
02/11/2014 10:41 SourceShop#4
Quote:
Originally Posted by Mognakor View Post
This probably bugs Red Meteonyker's onehit attack.
I haven't test soory :s
02/14/2014 17:49 Andrej-Delany#5
Quote:
Originally Posted by Mognakor View Post
This probably bugs Red Meteonyker's onehit attack.
If you arenīt sure about this do it like this:
Code:
if( pMover->IsPlayer() && pMover->IsMode( ONEKILL_MODE ) && !pMover->IsAuthHigher( AUTH_GENERAL ) )
then only Players are hit by this change.
(Change the Auth however you want.)