Changed ItemTypes to ItemUseTypes

This commit is contained in:
Uleat
2013-10-27 09:04:52 -04:00
parent 0d5fc26841
commit 3e6be197e6
15 changed files with 186 additions and 150 deletions
+2 -2
View File
@@ -506,7 +506,7 @@ void Mob::TryBackstab(Mob *other, int ReuseTime) {
//make sure we have a proper weapon if we are a client.
if(IsClient()) {
const ItemInst *wpn = CastToClient()->GetInv().GetItem(SLOT_PRIMARY);
if(!wpn || (wpn->GetItem()->ItemType != ItemTypePierce)){
if(!wpn || (wpn->GetItem()->ItemType != ItemType1HPiercing)){
Message_StringID(13, BACKSTAB_WEAPON);
return;
}
@@ -1138,7 +1138,7 @@ void Client::ThrowingAttack(Mob* other) { //old was 51
}
const Item_Struct* item = RangeWeapon->GetItem();
if(item->ItemType != ItemTypeThrowing && item->ItemType != ItemTypeThrowingv2) {
if(item->ItemType != ItemTypeLargeThrowing && item->ItemType != ItemTypeSmallThrowing) {
mlog(COMBAT__RANGED, "Ranged attack canceled. Ranged item %d is not a throwing weapon. type %d.", item->ItemType);
Message(0, "Error: Rangeweapon: GetItem(%i)==0, you have nothing useful to throw!", GetItemIDAt(SLOT_RANGE));
return;