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

[svn] *Implement new player conditions CONDITION_NO_AURA, CONDITION_ACTIVE_EVENT
* Default behaviour of pets for creatures changed to REACT_DEFENSIVE
* Disallowed sending wrapped items as COD
* Prevent loading and saving single target auras for pet in same way as already implemented for player
* Correctly limit use some flask types to zones.
* Fixed extracting common.MPQ under *nix
* Many small xleanups and fixes.
** mangos merge rev.

TEST REV so be careful of creepy crawly bugs!

Original author: KingPin?
Date: 2008-11-02 16:53:46-06:00

Files:
1 modified

Legend:

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

    r144 r149  
    65706570            return false; 
    65716571        } 
     6572                case CONDITION_NO_AURA: 
     6573                        return !player->HasAura(value1, value2); 
     6574                case CONDITION_ACTIVE_EVENT: 
     6575                        return gameeventmgr.IsActiveEvent(value1); 
    65726576        default: 
    65736577            return false; 
     
    66906694            break; 
    66916695        } 
     6696                case CONDITION_NO_AURA: 
     6697                { 
     6698                        if(!sSpellStore.LookupEntry(value1)) 
     6699                        { 
     6700                                sLog.outErrorDb("Aura condition requires to have non existing spell (Id: %d), skipped", value1); 
     6701                                return false; 
     6702                        } 
     6703                        if(value2 > 2) 
     6704                        { 
     6705                                sLog.outErrorDb("Aura condition requires to have non existing effect index (%u) (must be 0..2), skipped", value2); 
     6706                                return false; 
     6707                        } 
     6708                        break; 
     6709                } 
     6710                case CONDITION_ACTIVE_EVENT: 
     6711                { 
     6712                        GameEvent::GameEventDataMap const& events = gameeventmgr.GetEventMap(); 
     6713                        if(value1 >=events.size() || !events[value1].isValid()) 
     6714                        { 
     6715                                sLog.outErrorDb("Active event condition requires existed event id (%u), skipped", value1); 
     6716                                return false; 
     6717                        } 
     6718                        break; 
     6719                } 
    66926720    } 
    66936721    return true;