Changeset 6 for trunk/src/game/Unit.cpp

Show
Ignore:
Timestamp:
11/19/08 13:22:12 (17 years ago)
Author:
yumileroy
Message:

[svn] * Added ACE for Linux and Windows (Thanks Derex for Linux part and partial Windows part)
* Updated to 6721 and 676
* Fixed TrinityScript? logo
* Version updated to 0.2.6721.676

Original author: Neo2003
Date: 2008-10-04 06:17:19-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Unit.cpp

    r2 r6  
    29912991        if(player->CanParry() ) 
    29922992        { 
    2993             Item *tmpitem = ((Player*)this)->GetWeaponForAttack(BASE_ATTACK,true); 
     2993            Item *tmpitem = player->GetWeaponForAttack(BASE_ATTACK,true); 
    29942994            if(!tmpitem) 
    2995                 tmpitem = ((Player*)this)->GetWeaponForAttack(OFF_ATTACK,true); 
     2995                tmpitem = player->GetWeaponForAttack(OFF_ATTACK,true); 
    29962996 
    29972997            if(tmpitem) 
     
    30183018    if(GetTypeId() == TYPEID_PLAYER) 
    30193019    { 
    3020         Item *tmpitem = ((Player const*)this)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); 
    3021         if(tmpitem && !tmpitem->IsBroken() && tmpitem->GetProto()->Block) 
    3022             return GetFloatValue(PLAYER_BLOCK_PERCENTAGE); 
    3023         else 
    3024             return 0.0f; 
     3020        Player const* player = (Player const*)this; 
     3021        if(player->CanBlock() ) 
     3022        { 
     3023            Item *tmpitem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); 
     3024            if(tmpitem && !tmpitem->IsBroken() && tmpitem->GetProto()->Block) 
     3025                return GetFloatValue(PLAYER_BLOCK_PERCENTAGE); 
     3026        } 
     3027        // is player but has no block ability or no not broken shield equiped 
     3028        return 0.0f; 
    30253029    } 
    30263030    else 
     
    34163420        return c->canSwim(); 
    34173421    else 
    3418         return c->canWalk(); 
     3422        return c->canWalk() || c->canFly(); 
    34193423} 
    34203424