GetMeleeWeapon(object)
Returns TRUE if the item is a melee weapon.
int GetMeleeWeapon( object oItem );
Parameters
oItem
Item had to be determined.
Description
This function returns TRUE if the given object is melee weapon, FALSE otherwise.
Remarks
This function is not compatible with custom content as its based on base item type.
The following weapons are considered to be melee by this function:
- BASE_ITEM_BASTARDSWORD
- BASE_ITEM_BATTLEAXE
- BASE_ITEM_CLUB
- BASE_ITEM_DIREMACE
- BASE_ITEM_DOUBLEAXE
- BASE_ITEM_DWARVENWARAXE
- BASE_ITEM_GREATAXE
- BASE_ITEM_GREATSWORD
- BASE_ITEM_HALBERD
- BASE_ITEM_HANDAXE
- BASE_ITEM_HEAVYFLAIL
- BASE_ITEM_KAMA
- BASE_ITEM_KATANA
- BASE_ITEM_KUKRI
- BASE_ITEM_LIGHTFLAIL
- BASE_ITEM_LIGHTHAMMER
- BASE_ITEM_LIGHTMACE
- BASE_ITEM_LONGSWORD
- BASE_ITEM_MAGICSTAFF
- BASE_ITEM_MORNINGSTAR
- BASE_ITEM_QUARTERSTAFF
- BASE_ITEM_RAPIER
- BASE_ITEM_SCIMITAR
- BASE_ITEM_SCYTHE
- BASE_ITEM_SHORTSPEAR
- BASE_ITEM_SHORTSWORD
- BASE_ITEM_SICKLE
- BASE_ITEM_TRIDENT
- BASE_ITEM_TWOBLADEDSWORD
- BASE_ITEM_WARHAMMER
- BASE_ITEM_WHIP
Requirements
#include "x2_i0_spells"
Version
1.69
See Also
functions: | GetWeaponRanged | GetBaseItemType |
constants: | BASE_ITEM_* |
categories: | Get Data From Object Functions |
author: ShaDoOoW, editor: Mistress, Kookoo