| 2225 | | // Chest check |
| 2226 | | Unit* hrsone = _unit->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(_unit->GetPositionX(), _unit->GetPositionY(), _unit->GetPositionZ(), 16065); |
| 2227 | | Unit* hrstwo = _unit->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(_unit->GetPositionX(), _unit->GetPositionY(), _unit->GetPositionZ(), 16063); |
| 2228 | | Object* chest = _unit->GetMapMgr()->GetInterface()->GetGameObjectNearestCoords(2520.66f, -2955.36f, 245.634f, 181366); |
| 2229 | | if( hrsone != NULL && hrstwo != NULL ) |
| 2230 | | { |
| 2231 | | if(!hrsone->isAlive() && !hrstwo->isAlive() && !chest) |
| 2232 | | { |
| 2233 | | _unit->GetMapMgr()->GetInterface()->SpawnGameObject(181366 , 2520.66f, -2955.36f, 245.634f, 5.58505f, true, 0 , 0); |
| 2234 | | RemoveAIUpdateEvent(); |
| 2235 | | } |
| 2236 | | else if(!hrsone->isAlive() && !hrstwo->isAlive() && chest) |
| 2237 | | { |
| 2238 | | RemoveAIUpdateEvent(); |
| 2239 | | } |
| 2240 | | else if(chest) |
| 2241 | | { |
| 2242 | | RemoveAIUpdateEvent(); |
| 2243 | | } |
| 2244 | | else |
| 2245 | | { |
| 2246 | | RemoveAIUpdateEvent(); |
| 2247 | | } |
| 2248 | | } |
| 2249 | | else |
| 2250 | | { |
| 2251 | | RemoveAIUpdateEvent(); |
| 2252 | | } |
| | 2225 | RemoveAIUpdateEvent(); |
| 2432 | | // Chest check |
| 2433 | | Unit* hrsone = _unit->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(_unit->GetPositionX(), _unit->GetPositionY(), _unit->GetPositionZ(), 16064); |
| 2434 | | Unit* hrstwo = _unit->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(_unit->GetPositionX(), _unit->GetPositionY(), _unit->GetPositionZ(), 16063); |
| 2435 | | Object* chest = _unit->GetMapMgr()->GetInterface()->GetGameObjectNearestCoords(2520.66f, -2955.36f, 245.634f, 181366); |
| 2436 | | |
| 2437 | | if (hrsone && hrstwo) |
| 2438 | | if(!hrsone->isAlive() && !hrstwo->isAlive() && !chest) |
| 2439 | | { |
| 2440 | | _unit->GetMapMgr()->GetInterface()->SpawnGameObject(181366 , 2520.66f, -2955.36f, 245.634f, 5.58505f, true, 0, 0); |
| 2441 | | } |
| 2442 | | |
| 2618 | | // Chest check |
| 2619 | | Unit* hrsone = _unit->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(_unit->GetPositionX(), _unit->GetPositionY(), _unit->GetPositionZ(), 16064); |
| 2620 | | Unit* hrstwo = _unit->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(_unit->GetPositionX(), _unit->GetPositionY(), _unit->GetPositionZ(), 16065); |
| 2621 | | Object* chest = _unit->GetMapMgr()->GetInterface()->GetGameObjectNearestCoords(2520.66f, -2955.36f, 245.634f, 181366); |
| 2622 | | |
| 2623 | | if(!hrsone->isAlive() && !hrstwo->isAlive() && !chest) |
| 2624 | | { |
| 2625 | | _unit->GetMapMgr()->GetInterface()->SpawnGameObject(181366 , 2520.66f, -2955.36f, 245.634f, 5.58505f, true, 0, 0); |
| 2626 | | RemoveAIUpdateEvent(); |
| 2627 | | } |
| 2628 | | else if(!hrsone->isAlive() && !hrstwo->isAlive() && chest) |
| 2629 | | { |
| 2630 | | RemoveAIUpdateEvent(); |
| 2631 | | } |
| 2632 | | else if(chest) |
| 2633 | | { |
| 2634 | | RemoveAIUpdateEvent(); |
| 2635 | | } |
| 2636 | | else |
| 2637 | | { |
| 2638 | | RemoveAIUpdateEvent(); |
| 2639 | | } |
| | 2580 | RemoveAIUpdateEvent(); |