Systeme C++/Py[C++/Py] New Passive Skills

Moderatori: Moderators, Founder

Mesaj

Avatar utilizator
CEO
Posts
3802
*Descriere: Using this method u can create a new passike skill.

Code: PHP

Cod: Selectaţi tot

 GAME SRC
//File: char.cpp

//Search for:
	Int iMaxStamina;

//Add after:
    CSkillProto* pkSk;
    int value_skill = 0;

//Search for:
	iMaxHP += static_cast<int>(pkSk->kPointPoly.Eval());

//Add after:
        {
            pkSk = CSkillManager::instance().Get(SKILL_REALM_UNITY);

            if (NULL != pkSk)
            {
                pkSk->SetPointVar("k", 1.0f * GetSkillPower(SKILL_REALM_UNITY) / 100.0f);      //SKILL_REALM_UNITY -> Variable name for skill.
                value_skill = static_cast<int>(pkSk->kPointPoly.Eval());
                PointChange(POINT_MAX_HP_PCT,value_skill );
                value_skill = static_cast<int>(pkSk->kPointPoly2.Eval());
                PointChange(POINT_HP_REGEN,value_skill );
                value_skill = static_cast<int>(pkSk->kPointPoly3.Eval());
                PointChange(POINT_MALL_DEFBONUS,value_skill );
            }
        }

//Search for:

	int CHARACTER::GetLeadershipSkillLevel() const
	{ 
	    return GetSkillLevel(SKILL_LEADERSHIP);
	}

//Add after:
	int CHARACTER::GetRealmSkillLevel() const
	{
      	return GetSkillLevel(SKILL_REALM_UNITY);
	}

//File: char.h

//Search for:
	int                GetLeadershipSkillLevel() const;

//Add after:
	int                GetRealmSkillLevel() const;

//File: char_skill.cpp

//Search for:

	SKILL_RESIST_PENETRATE

//Add after:
      , SKILL_REALM_UNITY
      
      
//File: skill.h

//Search for:

	SKILL_HORSE_SUMMON        = 131,

//Add after:

	SKILL_REALM_UNITY        = 132,
Code: CPP

Cod: Selectaţi tot

 BINARY
//File: PythonPlayerModule.cpp

//Search for:

	extern const DWORD c_iSkillIndex_Summon        = 131;

//Add after:

	extern const DWORD c_iSkillIndex_Realm        = 132;

//Search for:

	PyModule_AddIntConstant(poModule, "SKILL_INDEX_SUMMON",            c_iSkillIndex_Summon);

//Add after:
	PyModule_AddIntConstant(poModule, "SKILL_INDEX_REALM",            c_iSkillIndex_Realm);

//File: PythonPlayerSkill.cpp

//Search for:


	bool CPythonPlayer::__CheckShortMana(TSkillInstance& rkSkillInst, CPythonSkill::TSkillData& rkSkillData)
	{
	    extern const DWORD c_iSkillIndex_Summon;
	    if (c_iSkillIndex_Summon == rkSkillInst.dwIndex)
 	       return false;


//Add after:

    extern const DWORD c_iSkillIndex_Realm;
    if (c_iSkillIndex_Realm == rkSkillInst.dwIndex)
        return false;
Code: CPP

Cod: Selectaţi tot

 ROOT
//File: playersettingmodule.py

//Search for:

	SKILL_INDEX_DICT = {

//Do:    Extend your "SUPPORT" for all jobs with: 132


//File: uicharacter.py

//Search for:

	SHOW_LIMIT_SUPPORT_SKILL_LIST

//Do: 	Extend with: 132
  
//Search for:

	skillType = skill.GetSkillType(skillIndex)


//Add after:

        if skillIndex == 132:
            if skillGrade == 1:
                skillLevel += 19
            elif skillGrade == 2:
                skillLevel += 29
            elif skillGrade == 3:
                skillLevel += 39
            self.toolTipSkill.SetSkillNew(srcSlotIndex, skillIndex, skillGrade, skillLevel)
            return
*DONT FORGET TO EDIT SKILLDESC.TXT, SKILLTABLE.TXT AND SKILL_PROTO.SQL W NEW SKILL
========================
CONTACT : diliulro@yahoo.com
========================
Scrie răspuns