| 2588 | } |
| 2589 | |
| 2590 | void Creature::fireCreatureRefreshIfNeeded() |
| 2591 | { |
| 2592 | if(!mNeedFireRefresh) |
| 2593 | return; |
| 2594 | |
| 2595 | mNeedFireRefresh = false; |
| 2596 | for(Seat* seat : mSeatsWithVisionNotified) |
| 2597 | { |
| 2598 | if(seat->getPlayer() == nullptr) |
| 2599 | continue; |
| 2600 | if(!seat->getPlayer()->getIsHuman()) |
| 2601 | continue; |
| 2602 | |
| 2603 | const std::string& name = getName(); |
| 2604 | ServerNotification *serverNotification = new ServerNotification( |
| 2605 | ServerNotificationType::entitiesRefresh, seat->getPlayer()); |
| 2606 | uint32_t nbCreature = 1; |
| 2607 | serverNotification->mPacket << nbCreature; |
| 2608 | serverNotification->mPacket << GameEntityType::creature; |
| 2609 | serverNotification->mPacket << name; |
| 2610 | exportToPacketForUpdate(serverNotification->mPacket, seat); |
| 2611 | ODServer::getSingleton().queueServerNotification(serverNotification); |
| 2612 | } |
| 2613 | } |
| 2614 | |
| 2615 | void Creature::fireChatMsgTookFee(int goldTaken) |
| 2616 | { |
no test coverage detected