void GroupObjectImplementation::sendSystemMessage(const String& fullPath, bool sendLeader) { Locker lock(_this.get()); for (int i = 0; i < groupMembers.size(); ++i) { GroupMember* member = &groupMembers.get(i); ManagedReference<SceneObject*> obj = member->get(); if (obj == NULL || !obj->isPlayerCreature() || (!sendLeader && obj == getLeader())) continue; CreatureObject* creature = cast<CreatureObject*>(obj.get()); creature->sendSystemMessage(fullPath); } }
void GroupObjectImplementation::sendSystemMessage(StringIdChatParameter& param, CreatureObject* excluded) { Locker lock(_this.getReferenceUnsafeStaticCast()); for (int i = 0; i < groupMembers.size(); ++i) { GroupMember* member = &groupMembers.get(i); ManagedReference<SceneObject*> obj = member->get(); if (obj == NULL || !obj->isPlayerCreature() || obj == excluded) continue; CreatureObject* creature = cast<CreatureObject*>(obj.get()); creature->sendSystemMessage(param); } }