92 lines
3.1 KiB
Plaintext
92 lines
3.1 KiB
Plaintext
void RemoveAllEffectsByCreator(object oCreator, object oPC);
|
|
void RemoveAllEffectsByDuration(object oPC, int iDuration = DURATION_TYPE_TEMPORARY);
|
|
void RemoveAllEffectsByType(object oPC, int iType = EFFECT_TYPE_ABILITY_INCREASE);
|
|
void RemoveAllEffectsBySubType(object oPC, int iSubType = SUBTYPE_MAGICAL);
|
|
void RemoveAllEffectsByTypeDuration(object oPC, int iType = EFFECT_TYPE_ABILITY_INCREASE, int iDuration = DURATION_TYPE_TEMPORARY);
|
|
|
|
void RemoveAllIPsByDuration(object oItem, int iDuration = DURATION_TYPE_TEMPORARY);
|
|
void RemoveAllIPsByType(object oItem, int iType = ITEM_PROPERTY_ONHITCASTSPELL);
|
|
|
|
// Allows you to remove all temporary item properties except onhitcast so darkfire will stay on
|
|
void RemoveAllIPsByDurationExceptType(object oItem, int iDuration = DURATION_TYPE_TEMPORARY, int iType = ITEM_PROPERTY_ONHITCASTSPELL);
|
|
|
|
void RemoveAllEffectsByCreator(object oCreator, object oPC)
|
|
{
|
|
effect e = GetFirstEffect(oPC);
|
|
while(GetIsEffectValid(e))
|
|
{
|
|
if (GetEffectCreator(e) == oCreator) RemoveEffect(oPC, e);
|
|
e = GetNextEffect(oPC);
|
|
}
|
|
}
|
|
|
|
void RemoveAllEffectsByDuration(object oPC, int iDuration = DURATION_TYPE_TEMPORARY)
|
|
{
|
|
effect e = GetFirstEffect(oPC);
|
|
while(GetIsEffectValid(e))
|
|
{
|
|
if (GetEffectDurationType(e) == iDuration) RemoveEffect(oPC, e);
|
|
e = GetNextEffect(oPC);
|
|
}
|
|
}
|
|
|
|
void RemoveAllEffectsByType(object oPC, int iType = EFFECT_TYPE_ABILITY_INCREASE)
|
|
{
|
|
effect e = GetFirstEffect(oPC);
|
|
while(GetIsEffectValid(e))
|
|
{
|
|
if (GetEffectType(e) == iType) RemoveEffect(oPC, e);
|
|
e = GetNextEffect(oPC);
|
|
}
|
|
}
|
|
|
|
void RemoveAllEffectsBySubType(object oPC, int iSubType = SUBTYPE_MAGICAL)
|
|
{
|
|
effect e = GetFirstEffect(oPC);
|
|
while(GetIsEffectValid(e))
|
|
{
|
|
if (GetEffectSubType(e) == iSubType) RemoveEffect(oPC, e);
|
|
e = GetNextEffect(oPC);
|
|
}
|
|
}
|
|
|
|
void RemoveAllEffectsByTypeDuration(object oPC, int iType = EFFECT_TYPE_ABILITY_INCREASE, int iDuration = DURATION_TYPE_TEMPORARY)
|
|
{
|
|
effect e = GetFirstEffect(oPC);
|
|
while(GetIsEffectValid(e))
|
|
{
|
|
if (GetEffectType(e) == iType) if (GetEffectDurationType(e) == iDuration) RemoveEffect(oPC, e);
|
|
e = GetNextEffect(oPC);
|
|
}
|
|
}
|
|
|
|
void RemoveAllIPsByDuration(object oItem, int iDuration = DURATION_TYPE_TEMPORARY)
|
|
{
|
|
itemproperty ip = GetFirstItemProperty(oItem);
|
|
while(GetIsItemPropertyValid(ip))
|
|
{
|
|
if (GetItemPropertyDurationType(ip) == iDuration) RemoveItemProperty(oItem, ip);
|
|
ip = GetNextItemProperty(oItem);
|
|
}
|
|
}
|
|
|
|
void RemoveAllIPsByType(object oItem, int iType = ITEM_PROPERTY_ONHITCASTSPELL)
|
|
{
|
|
itemproperty ip = GetFirstItemProperty(oItem);
|
|
while(GetIsItemPropertyValid(ip))
|
|
{
|
|
if (GetItemPropertyType(ip) == iType) RemoveItemProperty(oItem, ip);
|
|
ip = GetNextItemProperty(oItem);
|
|
}
|
|
}
|
|
|
|
void RemoveAllIPsByDurationExceptType(object oItem, int iDuration = DURATION_TYPE_TEMPORARY, int iType = ITEM_PROPERTY_ONHITCASTSPELL)
|
|
{
|
|
itemproperty ip = GetFirstItemProperty(oItem);
|
|
while(GetIsItemPropertyValid(ip))
|
|
{
|
|
if (GetItemPropertyDurationType(ip) == iDuration) if (GetItemPropertyType(ip) != iType) RemoveItemProperty(oItem, ip);
|
|
ip = GetNextItemProperty(oItem);
|
|
}
|
|
}
|