Ronaldo
Member-
Posts
8 -
Joined
-
Last visited
-
Feedback
0%
About Ronaldo

Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Ronaldo's Achievements
-
Standing Mount System Mount Animation
Ronaldo replied to Ronaldo's topic in Community Support - Questions & Answers
Can you help? -
Ronaldo started following Mouse cursor reset fix , Standing Mount System Mount Animation and No damage by horse's skills
-
Hi everyone I added the Wukong roar or skateboard animation. However, when I mount it, the character switches to the mount animation instead of being on the rooster. ActorInstance.cpp void CActorInstance::INSTANCEBASE_Transform() { if (m_pkHorse) { m_pkHorse->INSTANCEBASE_Transform(); m_x = m_pkHorse->NEW_GetCurPixelPositionRef().x; m_y = -m_pkHorse->NEW_GetCurPixelPositionRef().y; m_z = m_pkHorse->NEW_GetCurPixelPositionRef().z; #if defined(ENABLE_STANDING_MOUNT) if (m_bIsStandingMount) { m_pkHorse->Update(); m_pkHorse->TransformProcess(); m_pkHorse->Transform(); m_pkHorse->UpdatePointInstance(); } #endif m_bNeedUpdateCollision = TRUE; } Update(); TransformProcess(); Transform(); UpdatePointInstance(); ShakeProcess(); UpdateBoundingSphere(); UpdateAttribute(); } WORD CActorInstance::__GetCurrentComboType() { if (IsBowMode()) return 0; if (IsHandMode()) return 0; if (__IsMountingHorse() #if defined(ENABLE_STANDING_MOUNT) && !m_bIsStandingMount #endif ) return 0; return m_wcurComboType; } bool CActorInstance::IsHandMode() { if (CRaceMotionData::MODE_GENERAL == GetMotionMode()) return true; if (CRaceMotionData::MODE_HORSE == GetMotionMode()) return true; #if defined(ENABLE_STANDING_MOUNT) if (CRaceMotionData::MODE_HORSE_STAND == GetMotionMode()) return true; #endif return false; } bool CActorInstance::IsBowMode() { if (CRaceMotionData::MODE_BOW == GetMotionMode()) return true; if (CRaceMotionData::MODE_HORSE_BOW == GetMotionMode()) return true; #if defined(ENABLE_STANDING_MOUNT) if (CRaceMotionData::MODE_HORSE_STAND_BOW == GetMotionMode()) return true; #endif return false; } void CActorInstance::AccumulationMovement() { if (m_pkTree) return; if (m_pkHorse #if defined(ENABLE_STANDING_MOUNT) && (!m_bIsStandingMount || __IsMoveMotion()) #endif ) { m_pkHorse->__AccumulationMovement (m_fcurRotation); return; } __AccumulationMovement (m_fAdvancingRotation); } void CActorInstance::AddMovement(float fx, float fy, float fz) { #if defined(ENABLE_STANDING_MOUNT) if (m_pkHorse && m_bIsStandingMount) { m_pkHorse->AddMovement(fx, fy, fz); return; } #endif m_v3Movement.x += fx; m_v3Movement.y += fy; m_v3Movement.z += fz; } #if defined(ENABLE_STANDING_MOUNT) m_bIsStandingMount = false; #endif ActorInstanceAttach.cpp bool CActorInstance::__IsLeftHandWeapon (DWORD type) { if (CItemData::WEAPON_DAGGER == type || (CItemData::WEAPON_FAN == type && __IsMountingHorse() #if defined(ENABLE_STANDING_MOUNT) && !m_bIsStandingMount #endif )) return true; else if (CItemData::WEAPON_BOW == type) return true; else if (CItemData::WEAPON_CLAW == type) return true; else return false; } bool CActorInstance::__IsRightHandWeapon (DWORD type) { if (CItemData::WEAPON_DAGGER == type || (CItemData::WEAPON_FAN == type && __IsMountingHorse() #if defined(ENABLE_STANDING_MOUNT) && !m_bIsStandingMount #endif )) return true; else if (CItemData::WEAPON_BOW == type) return false; else if (CItemData::WEAPON_CLAW == type) return true; else return true; } ActorInstanceBattle.cpp void CActorInstance::__RunNextCombo() { ++m_dwcurComboIndex; /////////////////////////// #if defined(ENABLE_STANDING_MOUNT) int iMotionMode = GetMotionMode(); if (iMotionMode == CRaceMotionData::MODE_HORSE || (iMotionMode == CRaceMotionData::MODE_HORSE_STAND && (GetPartItemID(CRaceData::PART_MAIN) || GetPartItemID(CRaceData::PART_WEAPON_LEFT)))) return; #endif void CActorInstance::__OnEndCombo() { if (__IsMountingHorse()) { #if defined(ENABLE_STANDING_MOUNT) if (m_bIsStandingMount) return; #endif m_dwcurComboIndex = 1; } // ���⼭ ���� �ʱ�ȭ �ؼ� �ȵȴ�. // ���� �ʱ�ȭ �Ǵ� ���� ������ ���� ������ Motion �� �ڵ����� Wait ���� ���ư��� �����̴�. } ActorInstanceCollesionDe... void CActorInstance::BlockMovement() { if (m_pkHorse) { m_pkHorse->__InitializeMovement(); #if defined(ENABLE_STANDING_MOUNT) if (!m_bIsStandingMount) return; #else return; #endif } __InitializeMovement(); } ActorInstanceMotion.cpp DWORD CActorInstance::__SetMotion (const SSetMotionData& c_rkSetMotData, DWORD dwRandMotKey) { ........... #if defined(ENABLE_STANDING_MOUNT) if (m_pkHorse->CheckMotionThingIndex(dwChildMotKey)) { m_pkHorse->SetMotion(dwChildMotKey, c_rkSetMotData.fBlendTime, c_rkSetMotData.iLoopCount, c_rkSetMotData.fSpeedRatio); m_pkHorse->__BindMotionData(dwChildMotKey); if (c_rkSetMotData.iLoopCount) m_pkHorse->m_kCurMotNode.iMotionType = MOTION_TYPE_ONCE; // ¹«Á¶°Ç ÀÌÀü ¸ğ¼Ç ŸÀÔÀ¸·Î ¼³Á¤µÇ°í ÀÖ¾úÀ½ else m_pkHorse->m_kCurMotNode.iMotionType = MOTION_TYPE_LOOP; m_pkHorse->m_kCurMotNode.dwFrameCount = m_pkHorse->GetMotionDuration(dwChildMotKey) / (1.0f / g_fGameFPS); m_pkHorse->m_kCurMotNode.dwcurFrame = 0; m_pkHorse->m_kCurMotNode.dwMotionKey = dwChildMotKey; } #else m_pkHorse->SetMotion (dwChildMotKey, c_rkSetMotData.fBlendTime, c_rkSetMotData.iLoopCount, c_rkSetMotData.fSpeedRatio); m_pkHorse->__BindMotionData (dwChildMotKey); if (c_rkSetMotData.iLoopCount) m_pkHorse->m_kCurMotNode.iMotionType = MOTION_TYPE_ONCE; // ¹«Á¶°Ç ÀÌÀü ¸ğ¼Ç ŸÀÔÀ¸·Î ¼³Á¤µÇ°í ÀÖ¾úÀ½ else m_pkHorse->m_kCurMotNode.iMotionType = MOTION_TYPE_LOOP; m_pkHorse->m_kCurMotNode.dwFrameCount = m_pkHorse->GetMotionDuration (dwChildMotKey) / (1.0f / g_fGameFPS); m_pkHorse->m_kCurMotNode.dwcurFrame = 0; m_pkHorse->m_kCurMotNode.dwMotionKey = dwChildMotKey; #endif } else { CGraphicThingInstance::SetMotion (dwMotKey, c_rkSetMotData.fBlendTime, c_rkSetMotData.iLoopCount, c_rkSetMotData.fSpeedRatio); } __HideWeaponTrace(); RaceData.cpp #if defined(ENABLE_STANDING_MOUNT) case CRaceMotionData::MODE_HORSE_STAND: case CRaceMotionData::MODE_HORSE_STAND_CLAW: case CRaceMotionData::MODE_HORSE_STAND_ONEHAND_SWORD: case CRaceMotionData::MODE_HORSE_STAND_TWOHAND_SWORD: case CRaceMotionData::MODE_HORSE_STAND_DUALHAND_SWORD: case CRaceMotionData::MODE_HORSE_STAND_BOW: case CRaceMotionData::MODE_HORSE_STAND_FAN: case CRaceMotionData::MODE_HORSE_STAND_BELL: wGeneralMode = CRaceMotionData::MODE_HORSE_STAND; break; #endif RaceMotionData.h #if defined(ENABLE_STANDING_MOUNT) MODE_HORSE_STAND, MODE_HORSE_STAND_CLAW, MODE_HORSE_STAND_ONEHAND_SWORD, MODE_HORSE_STAND_TWOHAND_SWORD, MODE_HORSE_STAND_DUALHAND_SWORD, MODE_HORSE_STAND_BOW, MODE_HORSE_STAND_FAN, MODE_HORSE_STAND_BELL, #endif InstanceBase.cpp void CInstanceBase::MountHorse(UINT eRace) { m_kHorse.Destroy(); m_kHorse.Create(m_GraphicThingInstance.NEW_GetCurPixelPositionRef(), eRace, ms_adwCRCAffectEffect[EFFECT_HIT]); #if defined(ENABLE_STANDING_MOUNT) if (m_bIsStandingMount) SetMotionMode(CRaceMotionData::MODE_HORSE_STAND); else SetMotionMode(CRaceMotionData::MODE_HORSE); #else SetMotionMode(CRaceMotionData::MODE_HORSE); #endif SetRotationSpeed(c_fDefaultHorseRotationSpeed); m_GraphicThingInstance.MountHorse(m_kHorse.GetActorPtr()); m_GraphicThingInstance.Stop(); m_GraphicThingInstance.RefreshActorInstance(); } #if defined(ENABLE_MOUNT_COSTUME_SYSTEM) bool CInstanceBase::SetMount(DWORD eMount) { if (IsPoly()) return false; if (__IsShapeAnimalWear()) return false; m_GraphicThingInstance.ChangePart(CRaceData::PART_MOUNT, eMount); if (eMount) { CItemData* pItemData; if (CItemManager::Instance().GetItemDataPointer(eMount, &pItemData)) { m_awPart[CRaceData::PART_MOUNT] = eMount; #if defined(ENABLE_STANDING_MOUNT) m_bIsStandingMount = pItemData->GetSubType() == CItemData::COSTUME_MOUNT_STANDING; #endif } else { ClearMount(); } } else { ClearMount(); } #if defined(ENABLE_STANDING_MOUNT) m_GraphicThingInstance.SetStandingMount(m_bIsStandingMount); if (m_bIsStandingMount) RefreshWeapon(); #endif return true; } void CInstanceBase::ClearMount() { m_awPart[CRaceData::PART_MOUNT] = 0; #if defined(ENABLE_STANDING_MOUNT) m_bIsStandingMount = false; #endif } #if defined(ENABLE_STANDING_MOUNT) bool CInstanceBase::IsStandingMount() { return m_bIsStandingMount; } void CInstanceBase::RefreshState(DWORD dwMotIndex, bool isLoop) { DWORD dwPartItemID = m_GraphicThingInstance.GetPartItemID (CRaceData::PART_WEAPON); BYTE byItemType = 0xff; BYTE bySubType = 0xff; CItemManager& rkItemMgr = CItemManager::Instance(); CItemData* pItemData; if (rkItemMgr.GetItemDataPointer(dwPartItemID, &pItemData)) { byItemType = pItemData->GetType(); bySubType = pItemData->GetWeaponType(); } if (IsPoly()) SetMotionMode(CRaceMotionData::MODE_GENERAL); else if (IsWearingDress()) SetMotionMode(CRaceMotionData::MODE_WEDDING_DRESS); else if (byItemType == CItemData::ITEM_TYPE_PICK) { if (m_kHorse.IsMounting()) { #if defined(ENABLE_STANDING_MOUNT) if (m_bIsStandingMount) SetMotionMode(CRaceMotionData::MODE_HORSE_STAND); else SetMotionMode(CRaceMotionData::MODE_HORSE); #else SetMotionMode(CRaceMotionData::MODE_HORSE); #endif } else { SetMotionMode(CRaceMotionData::MODE_GENERAL); } } else if (byItemType == CItemData::ITEM_TYPE_ROD) { if (m_kHorse.IsMounting()) { #if defined(ENABLE_STANDING_MOUNT) if (m_bIsStandingMount) SetMotionMode(CRaceMotionData::MODE_HORSE_STAND); else SetMotionMode(CRaceMotionData::MODE_HORSE); #else SetMotionMode(CRaceMotionData::MODE_HORSE); #endif } else { SetMotionMode(CRaceMotionData::MODE_FISHING); } } else if (m_kHorse.IsMounting()) { #if defined(ENABLE_STANDING_MOUNT) if (m_bIsStandingMount) { switch (bySubType) { case CItemData::WEAPON_SWORD: SetMotionMode(CRaceMotionData::MODE_HORSE_STAND_ONEHAND_SWORD); break; case CItemData::WEAPON_TWO_HANDED: SetMotionMode(CRaceMotionData::MODE_HORSE_STAND_TWOHAND_SWORD); // Only Warrior break; case CItemData::WEAPON_DAGGER: SetMotionMode(CRaceMotionData::MODE_HORSE_STAND_DUALHAND_SWORD); // Only Assassin break; case CItemData::WEAPON_FAN: SetMotionMode(CRaceMotionData::MODE_HORSE_STAND_FAN); // Only Shaman break; case CItemData::WEAPON_BELL: SetMotionMode(CRaceMotionData::MODE_HORSE_STAND_BELL); // Only Shaman break; case CItemData::WEAPON_BOW: SetMotionMode(CRaceMotionData::MODE_HORSE_STAND_BOW); // Only Shaman break; case CItemData::WEAPON_CLAW: SetMotionMode(CRaceMotionData::MODE_HORSE_STAND_CLAW); // Only Wolfman break; default: SetMotionMode(CRaceMotionData::MODE_HORSE_STAND); break; } } else { switch (bySubType) { case CItemData::WEAPON_SWORD: SetMotionMode(CRaceMotionData::MODE_HORSE_ONEHAND_SWORD); break; case CItemData::WEAPON_TWO_HANDED: SetMotionMode(CRaceMotionData::MODE_HORSE_TWOHAND_SWORD); // Only Warrior break; case CItemData::WEAPON_DAGGER: SetMotionMode(CRaceMotionData::MODE_HORSE_DUALHAND_SWORD); // Only Assassin break; case CItemData::WEAPON_FAN: SetMotionMode(CRaceMotionData::MODE_HORSE_FAN); // Only Shaman break; case CItemData::WEAPON_BELL: SetMotionMode(CRaceMotionData::MODE_HORSE_BELL); // Only Shaman break; case CItemData::WEAPON_BOW: SetMotionMode(CRaceMotionData::MODE_HORSE_BOW); // Only Shaman break; case CItemData::WEAPON_CLAW: SetMotionMode(CRaceMotionData::MODE_HORSE_CLAW); // Only Wolfman break; default: SetMotionMode(CRaceMotionData::MODE_HORSE); break; } } #else switch (bySubType) { case CItemData::WEAPON_SWORD: SetMotionMode (CRaceMotionData::MODE_HORSE_ONEHAND_SWORD); break; case CItemData::WEAPON_TWO_HANDED: SetMotionMode (CRaceMotionData::MODE_HORSE_TWOHAND_SWORD); // Only Warrior break; case CItemData::WEAPON_DAGGER: SetMotionMode (CRaceMotionData::MODE_HORSE_DUALHAND_SWORD); // Only Assassin break; case CItemData::WEAPON_FAN: SetMotionMode (CRaceMotionData::MODE_HORSE_FAN); // Only Shaman break; case CItemData::WEAPON_BELL: SetMotionMode (CRaceMotionData::MODE_HORSE_BELL); // Only Shaman break; case CItemData::WEAPON_BOW: SetMotionMode (CRaceMotionData::MODE_HORSE_BOW); // Only Shaman break; case CItemData::WEAPON_CLAW: SetMotionMode(CRaceMotionData::MODE_HORSE_CLAW); // Only Wolfman break; default: SetMotionMode (CRaceMotionData::MODE_HORSE); break; } #endif } else { switch (bySubType) { case CItemData::WEAPON_SWORD: SetMotionMode(CRaceMotionData::MODE_ONEHAND_SWORD); break; case CItemData::WEAPON_TWO_HANDED: SetMotionMode(CRaceMotionData::MODE_TWOHAND_SWORD); // Only Warrior break; case CItemData::WEAPON_DAGGER: SetMotionMode(CRaceMotionData::MODE_DUALHAND_SWORD); // Only Assassin break; case CItemData::WEAPON_BOW: SetMotionMode(CRaceMotionData::MODE_BOW); // Only Assassin break; case CItemData::WEAPON_FAN: SetMotionMode(CRaceMotionData::MODE_FAN); // Only Shaman break; case CItemData::WEAPON_BELL: SetMotionMode(CRaceMotionData::MODE_BELL); // Only Shaman break; case CItemData::WEAPON_CLAW: SetMotionMode(CRaceMotionData::MODE_CLAW); // Only Wolfman break; case CItemData::WEAPON_ARROW: default: SetMotionMode(CRaceMotionData::MODE_GENERAL); break; } } if (isLoop) { m_GraphicThingInstance.InterceptLoopMotion (dwMotIndex); } else { m_GraphicThingInstance.InterceptOnceMotion (dwMotIndex); } RefreshActorInstance(); }
-
No damage by horse's skills
Ronaldo replied to Slindex's topic in Community Support - Questions & Answers
char_horse.cpp open search: CanUseHorseSkill replace: bool CHARACTER::CanUseHorseSkill() { return IsRiding() && GetHorseGrade() == 3 && GetHorseLevel() >= 20; } char_skill.cpp open search: if (IsRiding()) { if (GetMountVnum()) { if (!((GetMountVnum() >= 20209 && GetMountVnum() <= 20212) || GetMountVnum() == 20215 || GetMountVnum() == 20218 || GetMountVnum() == 20225)) return false; } switch (dwSkillVnum) { case SKILL_HORSE_WILDATTACK: case SKILL_HORSE_CHARGE: case SKILL_HORSE_ESCAPE: case SKILL_HORSE_WILDATTACK_RANGE: return true; } } replace if (IsRiding() && GetHorseLevel() >= 20) { switch (dwSkillVnum) { case SKILL_HORSE_WILDATTACK: case SKILL_HORSE_CHARGE: case SKILL_HORSE_ESCAPE: case SKILL_HORSE_WILDATTACK_RANGE: return true; } } -
Thanks, a solution is always a solution. Solve it with 100 lines of code or 2 lines of code. It's hard work. Here's the real solution. PythonApplicationProcedure.cpp Search: case WM_SETCURSOR: replace: case WM_SETCURSOR: { if (LOWORD(lParam) != HTCLIENT) break; if (m_bCursorVisible && CURSOR_MODE_HARDWARE == m_iCursorMode) ::SetCursor(static_cast<HCURSOR>(m_hCurrentCursor)); else ::SetCursor(nullptr); return TRUE; }
-
Please do not get me wrong. But when making this system, you need to include the package color function. You also need to include this function. m_v2Scale.x, m_v2Scale.y Because Metin2 doesn't have these functions in the basic codes of the game. It is wrong to use these functions in files without these functions. Because nobody will be able to use this system. So there is no logic to share publicly. But people should learn basic coding what you want and add the system. But you need to appeal to both people. Those who know coding and do not know coding. I'm sorry for my bad english. <3
-
there is no picture, brother.
-
I have no idea how to do this. therefore I will not be able to use the system. but i am grateful for your reply
-
Hello P3NG3R --> xP3NG3Rx I want to add this system. But I am constantly encountering errors. Error 1: Also bkz: rpHighLightImage->SetScale(m_v2Scale.x, m_v2Scale.y); It is not an identifier for me. For this reason, I had to do it this way. Here is My "SetDiffuseColor" My Member: PhytonWindow.h for : // Image class CImageBox : public CWindow { public: CImageBox(PyObject * ppyObject); virtual ~CImageBox(); BOOL LoadImage(const char * c_szFileName); void SetDiffuseColor(float fr, float fg, float fb, float fa); int GetWidth(); int GetHeight(); protected: virtual void OnCreateInstance(); virtual void OnDestroyInstance(); virtual void OnUpdate(); virtual void OnRender(); void OnChangePosition(); protected: CGraphicImageInstance * m_pImageInstance; }; other member: PhytonWindow.h for class CMarkBox : public CWindow { public: CMarkBox(PyObject * ppyObject); virtual ~CMarkBox(); void LoadImage(const char * c_szFilename); void SetDiffuseColor(float fr, float fg, float fb, float fa); void SetIndex(UINT uIndex); void SetScale(FLOAT fScale); protected: virtual void OnCreateInstance(); virtual void OnDestroyInstance(); virtual void OnUpdate(); virtual void OnRender(); void OnChangePosition(); protected: CGraphicMarkInstance * m_pMarkInstance; }; Thank You P3NG3R
