Jump to content

hardy89

Banned
  • Posts

    9
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by hardy89

  1. Il y a 2 heures, VegaS™ a dit :

    I could rewrite all of the functions and structure but i don't do it because the scope was to clean it not to change all structure, i did this long time ago.. if you saw the date.

    Btw, It's funny how you talk about shorter and efficient functions in python while...

    The code everytime can be improved, i don't like maybe a lot of scripts from metin2, but that doesn't means i've to rewrite them, there's isn't so much performance for a python script, if we don't talk about loops, searching, sort etc, it's fine how is it right now.

    I did that a long time ago to... Sorry, bbut seeing that you had refactored some functions, I thought you had forgotten this one. I just give an another way to do this. 

     

    il y a une heure, VegaS™ a dit :

     

    
    def GetAlignmentTitleName(currentAlignment):
    	for alignmentIndex, alignmentValue in enumerate((12000, 8000, 4000, 1000, 0, -4000, -8000, -12000)):
    		if currentAlignment >= alignmentValue:
    			return TITLE_NAME_LIST[alignmentIndex]
    	return TITLE_NAME_LIST[-1]

    Do you think people will understand it so well what's the index if they don't know what the function does?
    That's why i didn't touch these functions, they've edited (like added alignment grades) and don't know how to extend it.

    Btw, if you want to discuss this, we can go in off-topic category, already is enough.

    I think that people will understand better this code, even without actually understanding how it works that the huge ternary conditions of the other functions ... like :

    	def NumberToMoneyString(n):
    	return '0 {:s}'.format(MONETARY_UNIT0) if (n <= 0) else '{:s} {:s}'.format(('.'.join([(i - 3) < 0 and str(n)[:i] or str(n)[i - 3 : i] for i in range(len(str(n)) % 3, len(str(n)) + 1, 3) if i]), MONETARY_UNIT0))

    Word to the wise...

  2. Hi ! 

     

    I'm trying to put this in my server :

     But i've some errors... :

    if (m_eRace == CRaceData::RACE_ASSASSIN_W || m_eRace == CRaceData::RACE_ASSASSIN_M)

    I've not RACE_ASSASSIN_W or RACE_ASSASSIN_M on my RaceData.h, so I would like to know if anyone had it, and could tell me how to implement it?
    Or tell me how to modify these lines to go through another function can be?

     

    Code :

    		if (m_eRace == CRaceData::RACE_ASSASSIN_W || m_eRace == CRaceData::RACE_ASSASSIN_M)
    		{
    			CRaceMotionData* pRaceMotionData = m_pkCurRaceMotionData;
    			if (!pRaceMotionData)
    				return;
    
    			const NRaceData::TMotionAttackData * c_pData = m_pkCurRaceMotionData->GetMotionAttackDataPointer();
    			if (NRaceData::MOTION_TYPE_NORMAL == c_pData->iMotionType)
    			{
    				if (IsEqippedQuiver())
    					pInstance = rfm.CreateIndexedFlyingInstanceFlyTarget(GetQuiverEffectID(), v3Start, m_kFlyTarget);
    				else
    					pInstance = rfm.CreateFlyingInstanceFlyTarget(c_pFlyData->dwFlyIndex, v3Start, m_kFlyTarget, true);
    			}
    			else if (__IsMountingHorse())
    			{
    				if (IsEqippedQuiver())
    					pInstance = rfm.CreateIndexedFlyingInstanceFlyTarget(GetQuiverEffectID(), v3Start, m_kFlyTarget);
    				else
    					pInstance = rfm.CreateFlyingInstanceFlyTarget(c_pFlyData->dwFlyIndex, v3Start, m_kFlyTarget, true);
    			}
    			else
    				pInstance = rfm.CreateFlyingInstanceFlyTarget(c_pFlyData->dwFlyIndex, v3Start, m_kFlyTarget, true);
    		}
    		else
    			pInstance = rfm.CreateFlyingInstanceFlyTarget(c_pFlyData->dwFlyIndex, v3Start, m_kFlyTarget, true);

    Thank you...

  3. Hi !

    (Sorry for my bad english...)

    I made some changes on my server, but impossible to know what (long ago).
    Since when my server starts, and I try to connect, it sends me back to the login menu, and here is the problem:
    -If I enter real identifiers,: Lost connection
    -If I enter erratic identifiers: It tells me that the identifiers are incorrect.

    And 0 syserr, 0 crash..

    I know you can not help me magically, but I'd like to know if you have any idea where it might come from, because I really have no idea ...

     

    Thank you !

×
×
  • 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.