| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
As a side effect i had to remove the monster attack AI for now. I will
readd this as next thing.
|
|
|
|
| |
This allows to display hit messages in the client for abilities
|
| |
|
|
|
|
|
|
|
|
|
| |
Each ability can now define a cooldown that prevents the player from
using other abilities for a while. The time of this cooldown can be set
to any attribute. The modified value of the attribute is the value of
the cooldown in game ticks. The cooldown will be automatically started
if the ability has `autoconsume` set to true. Otherwise a script has to
call entity:cooldown_ability(ability).
|
|
|
|
|
|
| |
You do not need to reset the mana in the scripts if you do not want to.
We will need this for attacks later since those do not nessecary have a
script.
|
|
|
|
| |
This later allows monsters and characters to use this component.
|
|
|
|
|
|
|
|
|
|
| |
This allows a lot more flexibility and makes stuff like magical items a
lot easier to implement. We will also use this for the attack system in
the future. So a attack (abilitiy) would simply depend on some value
like Agility (or a derived attribute from it). Which sets the recharge
speed.
The recharge speed is the modified value of the attribute per game tick.
|
|
|
|
|
| |
Previously *every* ability was spammed over the network regardless
whether it was changed or not.
|
|
|
|
| |
This prevents really nasty code clientside
|
|
|
|
|
|
| |
On the one hand setSetName and setName could sound misleading in the qt
client patch i plan. On the otherhand i never really liked the name
"set". I think category is more general and obvious.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This way the scripts can add or replace existing member functions, which
can be useful. As demonstration chr_money and chr_money_change are now
added as Entity.money and Entity.change_money.
Also fixed the banker to use ask_number instead of ask_integer (I had
decided to rename this and apparently forgot the banker).
Mantis-issue: 503
Reviewed-by: Ablu
|
| |
|
|
|
|
|
| |
Version 2 was on the lpc2012 branch. With version 3 the lpc2012 and
master branches use again the same protocol.
|
|
|
|
| |
Mana-mantis: #506.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Not every connected game client has a character in the world. The code
was checking this, but since commit aa04597c5f8bb806996 the pointer was
being used before being checked.
|
|
|
|
| |
Same as in the client.
|
| |
|
| |
|
|
|
|
| |
Thanks to Ablu for noticing.
|
|
|
|
|
|
|
|
|
| |
Yay for C++11! static_assert is available since GCC 4.3.
Fixed warning when compiling with GCC 4.8:
src/utils/mathutils.cpp:53:18: warning: typedef ‘float_must_be_32_bits’
locally defined but not used [-Wunused-local-typedefs]
|
|
|
|
| |
It's not actually necessary.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some functions were skipped for now because they may need a new name
or change of behavior. Changes:
chr_warp entity:warp
chr_get_inventory entity:inventory
chr_inv_change entity:inv_change
chr_inv_count entity:inv_count
chr_get_equipment entity:equipment
chr_equip_slot entity:equip_slot
chr_equip_item entity:equip_item
chr_unequip_slot entity:unequip_slot
chr_unequip_item entity:unequip_item
chr_get_level entity:level
chr_get_exp entity:xp
chr_give_exp entity:give_xp
chr_get_rights entity:rights
chr_set_hair_style entity:set_hair_style
chr_get_hair_style entity:hair_style
chr_set_hair_color entity:set_hair_color
chr_get_hair_color entity:hair_color
chr_get_kill_count entity:kill_count
chr_give_special entity:give_special
chr_has_special entity:has_special
chr_take_special entity:take_special
chr_set_special_recharge_speed entity:set_special_recharge_speed
chr_get_special_recharge_speed entity:special_recharge_speed
chr_set_special_mana entity:set_special_mana
chr_get_special_mana entity:special_mana
chr_kick entity:kick
exp_for_level xp_for_level
monster_get_id entity:monster_id
monster_change_anger entity:change_anger
monster_drop_anger entity:drop_anger
monster_get_angerlist entity:angerlist
being_apply_status entity:apply_status
being_remove_status entity:remove_status
being_has_status entity:has_status
being_set_status_time entity:set_status_time
being_get_status_time entity:status_time
being_get_gender entity:gender
being_set_gender entity:set_gender
being_type entity:type
being_walk entity:walk
being_say entity:say
being_damage entity:damage
being_heal entity:heal
being_get_name entity:name
being_get_action entity:action
being_set_action entity:set_action
being_get_direction entity:direction
being_set_direction entity:set_direction
being_apply_attribute_modifier entity:apply_attribute_modifier
being_remove_attribute_modifier entity:remove_attribute_modifier
being_set_base_attribute entity:set_base_attribute
being_get_modified_attribute entity:modified_attribute
being_get_base_attribute entity:base_attribute
being_set_walkmask entity:set_walkmask
being_get_walkmask entity:walkmask
being_get_mapid entity:mapid
chat_message entity:message
being_register entity:register
chr_shake_screen entity:shake_screen
chr_create_text_particle entity:show_text_particle
- entity:position
posX entity:x
posY entity:y
monster_get_name monsterclass:name
item_get_name itemclass:name
|
|
|
|
|
|
|
|
| |
npc_message -> say
npc_choice -> ask
npc_ask_integer -> ask_number
npc_ask_string -> ask_string
npc_trade -> trade
|
|
|
|
|
|
|
|
| |
These functions can only be used in the context of a character talking
to an NPC, so these parameters can be deduced from that context rather
than passing them explicitly all the time.
Simplifies NPC scripting.
|
|
|
|
|
| |
Only moved a single script function to a member for now, will do others
in a separate commit.
|
|
|
|
|
|
|
|
| |
The point is to do this on the new character and to allow the client
to continue playing with the existing character instance (when it
represents the same character in the DB).
Somehow was changed in commit aa04597c5f8.
|
|
|
|
| |
BEGIN; END; does not work similar to sqlite here.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The requirement for having these definitions was relaxed in the C++11
standard. In short, they are not needed anymore for static const
integral types.
Details:
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#454
|
|
|
|
| |
It is only needed temporarily while serializing and deserializing.
|
|
|
|
| |
This was the final step to remove the hierachy with Entity on the top.
|
|
|
|
|
|
| |
I did not really care too much about staying consistent with the use of
static_casts to Actors since they are only temporary anyway until Actor
is a component too.
|
|
|
|
|
| |
A CharacterData was created as a proxy class in order to allow using the
old serialization method.
|
| |
|
| |
|
|
|
|
|
| |
It looks like mingw does not define all the stuff in c++0x it does
without.
|
|
|
|
|
|
|
| |
Things done:
- Allowed to create new Attributes outside of the protected scope of Being
- Moved Monster to MonsterComponent
- Some minor cleanup in the Attribute setting code of monsters
|
|
|
|
|
| |
This allows the server to compile with c++0x (and enables it).
This also includes some coding style / readabillity fixes.
|
|
|
|
| |
It was forgotten to remove when the new approach was added
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All damage dealing is now handeled via CombatComponent.
Monsters use a derived MonsterCombatComponent since they can have a damage
mutation and have a seperate script callback.
The wirering with Being is still not optional since most of the stuff does
not exist as components.
Things done:
- Seperated the fighting code from Being and only let Characters and Monsters
add the Component (less overhead for npcs)
- Added a getter for Attribute values to prevent searching it all the time in
non Being members
- Fixed the type if the damage mutation to double (no idea why it was int)
I did not want to copy it over incorrectly
- Removed the addAttack/removeAttack overrides in Character and made the
knuckleAttack being added based on newly added signals
Future TODOS:
- Remove depedency on Being as soon all needed dependencies are available
as components of Entity
- Move the monster script callback into the general combatcomponent and
make it usuable for characters too
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inline documentation is in general needlessly verbose and only makes it
harder to read the actual class API. This change moves this kind of
documentation to the function implementation for the 'Entity' class.
For inline methods, the implementation is moved outside of the class
using the 'inline' keyword. This provides a good place to put the
documentation, but it also further cleans up the class definition.
The class definition now gives a much better overview over its API. And
if needed, details can be looked up at the function implementations.
Reviewed-by: Erik Schilling
|
| |
|
|
|
|
| |
Reviewed-by: Yohann Ferreira
|