*Add CONDITION_INSTANCE_DATA for dynamic loot of instance such as Zul'aman and AV battleground.

*Script update for Zul'aman.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2008-12-02 18:12:39 -06:00
1 parent 3527679b29
commit 1328b1259b
5 files changed
+30 -9

No files matched your search

+10
View File
@@ -45,6 +45,7 @@
#include "SpellAuras.h"
#include "Util.h"
#include "WaypointManager.h"
#include "InstanceData.h" //for condition_instance_data
INSTANTIATE_SINGLETON_1(ObjectMgr);
@@ -6737,6 +6738,12 @@ bool PlayerCondition::Meets(Player const * player) const
return !player->HasAura(value1, value2);
case CONDITION_ACTIVE_EVENT:
return gameeventmgr.IsActiveEvent(value1);
case CONDITION_INSTANCE_DATA:
{
Map *map = player->GetMap();
if(map && map->IsDungeon() && ((InstanceMap*)map)->GetInstanceData())
return ((InstanceMap*)map)->GetInstanceData()->GetData(value1) == value2;
}
default:
return false;
}
@@ -6881,6 +6888,9 @@ bool PlayerCondition::IsValid(ConditionType condition, uint32 value1, uint32 val
}
break;
}
case CONDITION_INSTANCE_DATA:
//TODO: need some check
break;
}
return true;
}