-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
no more ID's, just declare beautiful names
- Loading branch information
1 parent
a5644c0
commit 51a4cf7
Showing
5 changed files
with
156 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
function Creature:onChangeOutfit(outfit) | ||
if hasEventCallback(EVENT_CALLBACK_ONCHANGEMOUNT) then | ||
if not EventCallback(EVENT_CALLBACK_ONCHANGEMOUNT, self, outfit.lookMount) then | ||
if EventCallback.onChangeMount then | ||
if not EventCallback.onChangeMount(self, outfit.lookMount) then | ||
return false | ||
end | ||
end | ||
if hasEventCallback(EVENT_CALLBACK_ONCHANGEOUTFIT) then | ||
return EventCallback(EVENT_CALLBACK_ONCHANGEOUTFIT, self, outfit) | ||
if EventCallback.onChangeOutfit then | ||
return EventCallback.onChangeOutfit(self, outfit) | ||
else | ||
return true | ||
end | ||
end | ||
|
||
function Creature:onAreaCombat(tile, isAggressive) | ||
if hasEventCallback(EVENT_CALLBACK_ONAREACOMBAT) then | ||
return EventCallback(EVENT_CALLBACK_ONAREACOMBAT, self, tile, isAggressive) | ||
if EventCallback.onAreaCombat then | ||
return EventCallback.onAreaCombat(self, tile, isAggressive) | ||
else | ||
return RETURNVALUE_NOERROR | ||
end | ||
end | ||
|
||
function Creature:onTargetCombat(target) | ||
if hasEventCallback(EVENT_CALLBACK_ONTARGETCOMBAT) then | ||
return EventCallback(EVENT_CALLBACK_ONTARGETCOMBAT, self, target) | ||
if EventCallback.onTargetCombat then | ||
return EventCallback.onTargetCombat(self, target) | ||
else | ||
return RETURNVALUE_NOERROR | ||
end | ||
end | ||
|
||
function Creature:onHear(speaker, words, type) | ||
if hasEventCallback(EVENT_CALLBACK_ONHEAR) then | ||
EventCallback(EVENT_CALLBACK_ONHEAR, self, speaker, words, type) | ||
if EventCallback.onHear then | ||
EventCallback.onHear(self, speaker, words, type) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.