- Mesaj
- 11
- Beğeni
- 5
- Puan
- 13
- Ticaret Puanı
- 0
client bluid alırken hata derlerken aldıgım hata ne hatası bu ne yapmam gerek destek verir misiniz.. pek anlamıyorumda
efetk sistemi ekledim bluid alırken verdi bluid te 2022 kullandım
üstüne tıklayınca açılan kod
bu kodu en alt parantezden sonra yapıştırdım oldugu gibi aynen böyle
efetk sistemi ekledim bluid alırken verdi bluid te 2022 kullandım
üstüne tıklayınca açılan kod
Kod:
bool CInstanceBase::SetWeapon(DWORD eWeapon)
{
if (IsPoly())
return false;
if (__IsShapeAnimalWear())
return false;
if (__IsChangableWeapon(eWeapon) == false)
eWeapon = 0;
m_GraphicThingInstance.AttachWeapon(eWeapon);
m_awPart[CRaceData::PART_WEAPON] = eWeapon;
//Weapon Effect
CItemData * pItemData;
if (CItemManager::Instance().GetItemDataPointer(eWeapon, &pItemData))
__GetRefinedEffect(pItemData);
#ifdef ENABLE_SHINING_SYSTEM
__GetShiningEffect(pItemData);
#endif
else
__ClearWeaponRefineEffect();
#ifdef ENABLE_SHINING_SYSTEM
__ClearWeaponShiningEffect();
#endif
return true;
}
bu kodu en alt parantezden sonra yapıştırdım oldugu gibi aynen böyle
Kod:
// En Alta Ekle
#ifdef ENABLE_SHINING_SYSTEM
//This method checks if the item has shinings and will attach them.
//Weapons are heaving special checks for two sided weapons like daggers or fans while mounting.
//Every itemtype is supported. If no explicit logic is implemented it will be attached to "Bip01".
void CInstanceBase::__GetShiningEffect(CItemData* pItem)
{
//Set this to true if you want to hide the refine effect if there's a shining for this item.
bool removeRefineEffect = false;
CItemData::TItemShiningTable shiningTable = pItem->GetItemShiningTable();
if (pItem->GetType() == CItemData::ITEM_TYPE_WEAPON)
{
__ClearWeaponShiningEffect();
if (shiningTable.Any() && removeRefineEffect)
{
__ClearWeaponRefineEffect();
}
for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++)
{
if (strcmp(shiningTable.szShinings[i], ""))
{
if (pItem->GetSubType() == CItemData::WEAPON_BOW)
{
__AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON_LEFT");
}
else
{
//Check for double sided weapons or fan which is attached on both sides when mounted.
#ifdef ENABLE_WOLFMAN
bool twoSidedWeapon = pItem->GetSubType() == CItemData::WEAPON_DAGGER || (IsMountingHorse() && pItem->GetSubType() == CItemData::WEAPON_FAN) || pItem->GetSubType() == CItemData::WEAPON_CLAW;
#else
bool twoSidedWeapon = pItem->GetSubType() == CItemData::WEAPON_DAGGER || (IsMountingHorse() && pItem->GetSubType() == CItemData::WEAPON_FAN);
#endif
if (twoSidedWeapon)
{
__AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON_LEFT");
}
__AttachWeaponShiningEffect(i, shiningTable.szShinings[i], "PART_WEAPON");
}
}
}
}
if (pItem->GetType() == CItemData::ITEM_TYPE_ARMOR && pItem->GetSubType() == CItemData::ARMOR_BODY)
{
__ClearArmorShiningEffect();
if (shiningTable.Any() && removeRefineEffect)
{
__ClearArmorRefineEffect();
}
for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++)
{
if (strcmp(shiningTable.szShinings[i], ""))
{
__AttachArmorShiningEffect(i, shiningTable.szShinings[i]);
}
}
}
}
//Attaching the shining effect.
//BoneName can be "PART_WEAPON" or "PART_WEAPON_LEFT" to get the attaching bone name dynamically.
//If boneName is not given "Bip01" is used as boneName.
void CInstanceBase::__AttachWeaponShiningEffect(int effectIndex, const char* effectFileName, const char* boneName)
{
if (IsAffect(AFFECT_INVISIBILITY))
{
return;
}
if (effectIndex >= CItemData::ITEM_SHINING_MAX_COUNT)
{
return;
}
CEffectManager::Instance().RegisterEffect(effectFileName, false, false);
if (!strcmp(boneName, "PART_WEAPON"))
{
const char* c_szRightBoneName;
m_GraphicThingInstance.GetAttachingBoneName(CRaceData::PART_WEAPON, &c_szRightBoneName);
if (strcmp(c_szRightBoneName, ""))
{
m_weaponShiningEffects[0][effectIndex] = m_GraphicThingInstance.AttachEffectByName(0, c_szRightBoneName, effectFileName);
}
}
else if (!strcmp(boneName, "PART_WEAPON_LEFT"))
{
const char* c_szLeftBoneName;
m_GraphicThingInstance.GetAttachingBoneName(CRaceData::PART_WEAPON_LEFT, &c_szLeftBoneName);
if (strcmp(c_szLeftBoneName, ""))
{
m_weaponShiningEffects[1][effectIndex] = m_GraphicThingInstance.AttachEffectByName(0, c_szLeftBoneName, effectFileName);
}
}
else
{
Tracef("Invalid partname for getting attaching bone name. %s - %s", effectFileName, boneName);
}
}
//Attaching the armor shining effect.
//If boneName is not given "Bip01" is used as boneName.
void CInstanceBase::__AttachArmorShiningEffect(int effectIndex, const char* effectFileName, const char* boneName)
{
if (IsAffect(AFFECT_INVISIBILITY))
{
return;
}
if (effectIndex >= CItemData::ITEM_SHINING_MAX_COUNT)
{
return;
}
if (!strcmp(boneName, ""))
{
Tracef("Empty bone name for attaching armor shining. Effect Index: %i, EffectFileName: %s", effectIndex, effectFileName);
return;
}
CEffectManager::Instance().RegisterEffect(effectFileName, false, false);
m_armorShiningEffects[effectIndex] = m_GraphicThingInstance.AttachEffectByName(0, boneName, effectFileName);
}
//Clears all weapon shining effects. Left & Right if set.
void CInstanceBase::__ClearWeaponShiningEffect(bool detaching)
{
if (detaching)
{
for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++)
{
if (m_weaponShiningEffects[0][i])
{
__DetachEffect(m_weaponShiningEffects[0][i]);
}
if (m_weaponShiningEffects[1][i])
{
__DetachEffect(m_weaponShiningEffects[1][i]);
}
}
}
memset(&m_weaponShiningEffects, 0, sizeof(m_weaponShiningEffects));
}
//Clears all armor shining effects.
void CInstanceBase::__ClearArmorShiningEffect(bool detaching)
{
if (detaching)
{
for (int i = 0; i < CItemData::ITEM_SHINING_MAX_COUNT; i++)
{
__DetachEffect(m_armorShiningEffects[i]);
}
}
memset(&m_armorShiningEffects, 0, sizeof(m_armorShiningEffects));
}
#endif
Son düzenleme: