本文整理汇总了C++中CCharEntity::setWeaponSkillKill方法的典型用法代码示例。如果您正苦于以下问题:C++ CCharEntity::setWeaponSkillKill方法的具体用法?C++ CCharEntity::setWeaponSkillKill怎么用?C++ CCharEntity::setWeaponSkillKill使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCharEntity
的用法示例。
在下文中一共展示了CCharEntity::setWeaponSkillKill方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DropItems
//.........这里部分代码省略.........
}
// check for gil (beastmen drop gil, some NMs drop gil)
if (CanDropGil() || (map_config.all_mobs_gil_bonus > 0 && getMobMod(MOBMOD_GIL_MAX) >= 0)) // Negative value of MOBMOD_GIL_MAX is used to prevent gil drops in Dynamis/Limbus.
{
charutils::DistributeGil(PChar, this); // TODO: REALISATION MUST BE IN TREASUREPOOL
}
//check for seal drops
/* MobLvl >= 1 = Beastmen Seals ID=1126
>= 50 = Kindred Seals ID=1127
>= 75 = Kindred Crests ID=2955
>= 90 = High Kindred Crests ID=2956
*/
uint16 Pzone = PChar->getZone();
bool validZone = ((Pzone > 0 && Pzone < 39) || (Pzone > 42 && Pzone < 134) || (Pzone > 135 && Pzone < 185) || (Pzone > 188 && Pzone < 255));
if (validZone && charutils::GetRealExp(PChar->GetMLevel(), GetMLevel()) > 0)
{
if (((PChar->StatusEffectContainer->HasStatusEffect(EFFECT_SIGNET) && conquest::GetInfluenceGraphics(PChar->loc.zone->GetRegionID()) < 64) ||
(PChar->StatusEffectContainer->HasStatusEffect(EFFECT_SANCTION) && PChar->loc.zone->GetRegionID() >= 28 && PChar->loc.zone->GetRegionID() <= 32) ||
(PChar->StatusEffectContainer->HasStatusEffect(EFFECT_SIGIL) && PChar->loc.zone->GetRegionID() >= 33 && PChar->loc.zone->GetRegionID() <= 40)) &&
m_Element > 0 && dsprand::GetRandomNumber(100) < 20) // Need to move to CRYSTAL_CHANCE constant
{
PChar->PTreasurePool->AddItem(4095 + m_Element, this);
}
// Todo: Avatarite and Geode drops during day/weather. Much higher chance during weather than day.
// Item element matches day/weather element, not mob crystal. Lv80+ xp mobs can drop Avatarite.
// Wiki's have conflicting info on mob lv required for Geodes. One says 50 the other 75. I think 50 is correct.
if (dsprand::GetRandomNumber(100) < 20 && PChar->PTreasurePool->CanAddSeal() && !getMobMod(MOBMOD_NO_DROPS))
{
//RULES: Only 1 kind may drop per mob
if (GetMLevel() >= 75 && luautils::IsExpansionEnabled("ABYSSEA")) //all 4 types
{
switch (dsprand::GetRandomNumber(4))
{
case 0:
PChar->PTreasurePool->AddItem(1126, this);
break;
case 1:
PChar->PTreasurePool->AddItem(1127, this);
break;
case 2:
PChar->PTreasurePool->AddItem(2955, this);
break;
case 3:
PChar->PTreasurePool->AddItem(2956, this);
break;
}
}
else if (GetMLevel() >= 70 && luautils::IsExpansionEnabled("ABYSSEA")) //b.seal & k.seal & k.crest
{
switch (dsprand::GetRandomNumber(3))
{
case 0:
PChar->PTreasurePool->AddItem(1126, this);
break;
case 1:
PChar->PTreasurePool->AddItem(1127, this);
break;
case 2:
PChar->PTreasurePool->AddItem(2955, this);
break;
}
}
else if (GetMLevel() >= 50) //b.seal & k.seal only
{
if (dsprand::GetRandomNumber(2) == 0)
{
PChar->PTreasurePool->AddItem(1126, this);
}
else
{
PChar->PTreasurePool->AddItem(1127, this);
}
}
else
{
//b.seal only
PChar->PTreasurePool->AddItem(1126, this);
}
}
}
}
PChar->setWeaponSkillKill(false);
StatusEffectContainer->KillAllStatusEffect();
// NOTE: this is called for all alliance / party members!
luautils::OnMobDeath(this, PChar);
}
else
{
luautils::OnMobDeath(this, nullptr);
}
}