|
| item_generic_limit_chance_above_60 () |
|
bool | OnCastItemCombatSpell (Player *, Unit *victim, SpellInfo const *, Item *) override |
|
bool | IsDatabaseBound () const override |
|
virtual bool | OnQuestAccept (Player *, Item *, Quest const *) |
|
virtual bool | OnUse (Player *, Item *, SpellCastTargets const &) |
|
virtual bool | OnRemove (Player *, Item *) |
|
virtual bool | OnExpire (Player *, ItemTemplate const *) |
|
virtual void | OnGossipSelect (Player *, Item *, uint32, uint32) |
|
virtual void | OnGossipSelectCode (Player *, Item *, uint32, uint32, const char *) |
|
virtual bool | isAfterLoadScript () const |
|
virtual void | checkValidity () |
|
const std::string & | GetName () const |
|
uint16 | GetTotalAvailableHooks () |
|
◆ item_generic_limit_chance_above_60()
item_generic_limit_chance_above_60::item_generic_limit_chance_above_60 |
( |
| ) |
|
|
inline |
198:
ItemScript(
"item_generic_limit_chance_above_60") { }
Definition ItemScript.h:24
◆ OnCastItemCombatSpell()
bool item_generic_limit_chance_above_60::OnCastItemCombatSpell |
( |
Player * |
, |
|
|
Unit * |
victim, |
|
|
SpellInfo const * |
, |
|
|
Item * |
|
|
) |
| |
|
inlineoverridevirtual |
Reimplemented from ItemScript.
201 {
202
204 {
205
206 float const lvlPenaltyFactor = 9.93f;
207 float const failureChance = (victim->
GetLevel() - 60) * lvlPenaltyFactor;
208
209
211 }
212
213 return true;
214 }
bool roll_chance_f(float chance)
Definition Random.h:54
uint8 GetLevel() const
Definition Unit.h:1033
References Unit::GetLevel(), and roll_chance_f().
The documentation for this class was generated from the following file: