Changeset 55
- Timestamp:
- 11/19/08 13:29:45 (17 years ago)
- Location:
- trunk/src
- Files:
-
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bindings/scripts/include/sc_creature.h
r44 r55 30 30 void EnterEvadeMode(); 31 31 32 //Called at any heal cast/item used (call non implemented in Trinity)33 void HealBy(Unit *healer, uint32 amount_healed) {}34 35 // Called at any Damage to any victim (before damage apply)36 void DamageDeal(Unit *done_to, uint32 &damage) {}37 38 32 // Called at any Damage from any attacker (before damage apply) 39 33 void DamageTaken(Unit *done_by, uint32 &damage) {} … … 58 52 59 53 // Called when hit by a spell 60 void SpellHit(Unit*, const SpellEntry*) {} 54 void SpellHit(Unit* caster, const SpellEntry*) {} 55 56 // Called when spell hits a target 57 void SpellHitTarget(Unit* target, const SpellEntry*) {} 61 58 62 59 // Called when creature is spawned or respawned (for reseting variables) -
trunk/src/bindings/scripts/sql/Updates/r57_trinity.sql
r53 r55 37 37 INSERT INTO `spell_script_target` VALUES ('42577', '1', '24136'); 38 38 39 UPDATE `creature_template` SET ` lootid` = `entry`, `ScriptName` = 'npc_zulaman_hostage' WHERE `entry` IN (23790, 23999, 24024, 24001);39 UPDATE `creature_template` SET `ScriptName` = 'npc_zulaman_hostage' WHERE `entry` IN (23790, 23999, 24024, 24001); -
trunk/src/game/CreatureAI.h
r44 r55 83 83 virtual void EnterEvadeMode() = 0; 84 84 85 // Called at any heal cast/item used (call non implemented)86 virtual void HealBy(Unit * /*healer*/, uint32 /*amount_healed*/) {}87 88 // Called at any Damage to any victim (before damage apply)89 virtual void DamageDeal(Unit * /*done_to*/, uint32 & /*damage*/) {}90 91 85 // Called at any Damage from any attacker (before damage apply) 92 86 virtual void DamageTaken(Unit *done_by, uint32 & /*damage*/) { AttackedBy(done_by); } … … 111 105 // Called when hit by a spell 112 106 virtual void SpellHit(Unit*, const SpellEntry*) {} 107 108 // Called when spell hits a target 109 virtual void SpellHitTarget(Unit* target, const SpellEntry*) {} 113 110 114 111 // Called when vitim entered water and creature can not enter water -
trunk/src/game/Spell.cpp
r53 r55 945 945 ((Creature*)unit)->AI()->SpellHit(m_caster ,m_spellInfo); 946 946 } 947 948 if(m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->AI()) 949 ((Creature*)m_caster)->AI()->SpellHitTarget(unit, m_spellInfo); 947 950 } 948 951 -
trunk/src/game/Unit.cpp
r44 r55 478 478 } 479 479 480 //Script Event damage Deal481 if( GetTypeId()== TYPEID_UNIT && ((Creature *)this)->AI())482 ((Creature *)this)->AI()->DamageDeal(pVictim, damage);483 480 //Script Event damage taken 484 481 if( pVictim->GetTypeId()== TYPEID_UNIT && ((Creature *)pVictim)->AI() )