Advertisement
Guest User

ReFresh - Tutorial.cpp

a guest
Apr 4th, 2019
2,701
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.69 KB | None | 0 0
  1. --------------------------------------------------------------------------------------------------
  2. //////////////////////////////////////////////////////////////////////////////////////////////////
  3. --------------------------------------------------------------------------------------------------
  4. //UserInterface/PythonCharacterManagerModule.cpp
  5.  
  6. // Find
  7.  
  8.     PyModule_AddIntConstant(poModule, "EFFECT_REFINED",             CInstanceBase::EFFECT_REFINED);
  9.  
  10. // Add below
  11.     PyModule_AddIntConstant(poModule, "EFFECT_BOSS",                CInstanceBase::EFFECT_BOSS);
  12. --------------------------------------------------------------------------------------------------
  13. //////////////////////////////////////////////////////////////////////////////////////////////////
  14. --------------------------------------------------------------------------------------------------
  15. //UserInterface/InstanceBase.cpp
  16.  
  17. // Find
  18.  
  19. RegisterBoundingSphere();
  20.  
  21. // Add below
  22.  
  23.     uint32_t dwRank = CPythonNonPlayer::Instance().GetMonsterRank(c_rkCreateData.m_dwRace);
  24.     uint32_t dwType = CPythonNonPlayer::Instance().GetMonsterType(c_rkCreateData.m_dwRace);
  25.     if (dwRank >= 4 && dwType == 0)
  26.         __AttachBossEffect();
  27. --------------------------------------------------------------------------------------------------
  28. //////////////////////////////////////////////////////////////////////////////////////////////////
  29. --------------------------------------------------------------------------------------------------
  30. //UserInterface/InstanceBase.h
  31.  
  32. // Find
  33.  
  34. EFFECT_TEMP,
  35.  
  36. // Add below
  37.  
  38. EFFECT_BOSS,
  39.  
  40. /*
  41. NOTE:
  42.     If the boss effect over head isn't displayed --> max limit of enum (276 - is default effect range done by ymir) is reached,
  43.     so you probably placed the EFFECT_BOSS below EFFECT_NUM which determines range of enum.
  44. */
  45.  
  46. // Find
  47.  
  48. void __EffectContainer_Destroy();
  49.  
  50. // Add below
  51.  
  52. void __AttachBossEffect();
  53. --------------------------------------------------------------------------------------------------
  54. //////////////////////////////////////////////////////////////////////////////////////////////////
  55. --------------------------------------------------------------------------------------------------
  56. //UserInterface/InstanceBaseEffect.cpp
  57.  
  58. // Find
  59.  
  60. void CInstanceBase::__EffectContainer_DetachEffect(DWORD dwEftKey)
  61.  
  62. // Add below as new function
  63.  
  64. void CInstanceBase::__AttachBossEffect()
  65. {
  66.     if (!__IsExistMainInstance())
  67.         return;
  68.  
  69.     CInstanceBase* pkInstMain = __GetMainInstancePtr();
  70.  
  71.     if (IsWarp())
  72.         return;
  73.     if (IsObject())
  74.         return;
  75.     if (IsFlag())
  76.         return;
  77.     if (IsResource())
  78.         return;
  79.  
  80.     __EffectContainer_AttachEffect(EFFECT_BOSS);
  81. }
  82. --------------------------------------------------------------------------------------------------
  83. //////////////////////////////////////////////////////////////////////////////////////////////////
  84. --------------------------------------------------------------------------------------------------
  85. //UserInterface/PythonNonPlayer.cpp
  86.  
  87. // Find
  88.  
  89. DWORD CPythonNonPlayer::GetMonsterColor(DWORD dwVnum)
  90.  
  91. // Add below as new functions
  92.  
  93. DWORD CPythonNonPlayer::GetMonsterType(DWORD dwVnum)
  94. {
  95.     const CPythonNonPlayer::TMobTable* c_pTable = GetTable(dwVnum);
  96.     if (!c_pTable)
  97.         return 0;
  98.  
  99.     return c_pTable->bType;
  100. }
  101.  
  102. DWORD CPythonNonPlayer::GetMonsterRank(DWORD dwVnum)
  103. {
  104.     const CPythonNonPlayer::TMobTable* c_pTable = GetTable(dwVnum);
  105.     if (!c_pTable)
  106.         return 0;
  107.  
  108.     return c_pTable->bRank;
  109. }
  110. --------------------------------------------------------------------------------------------------
  111. //////////////////////////////////////////////////////////////////////////////////////////////////
  112. --------------------------------------------------------------------------------------------------
  113. //UserInterface/PythonNonPlayer.h
  114.  
  115. // Find
  116.  
  117. const char*         GetMonsterName(DWORD dwVnum);
  118.  
  119. // Add below
  120.  
  121. DWORD               GetMonsterType(DWORD dwVnum);
  122. DWORD               GetMonsterRank(DWORD dwVnum);
  123. --------------------------------------------------------------------------------------------------
  124. //////////////////////////////////////////////////////////////////////////////////////////////////
  125. --------------------------------------------------------------------------------------------------
  126. //root/playersettingmodule.py
  127.  
  128. //Find
  129.  
  130. chrmgr.RegisterEffect(chrmgr.EFFECT_AFFECT+0, "Bip01", localeInfo.FN_GM_MARK)
  131.  
  132. // Add below
  133.  
  134. chrmgr.RegisterEffect(chrmgr.EFFECT_BOSS, "", "d:/ymir work/effect/etc/boss_effect/boss.mse")
  135. --------------------------------------------------------------------------------------------------
  136. //////////////////////////////////////////////////////////////////////////////////////////////////
  137. --------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement