本文整理汇总了C++中PlayerManager::removeEncumbrancies方法的典型用法代码示例。如果您正苦于以下问题:C++ PlayerManager::removeEncumbrancies方法的具体用法?C++ PlayerManager::removeEncumbrancies怎么用?C++ PlayerManager::removeEncumbrancies使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerManager
的用法示例。
在下文中一共展示了PlayerManager::removeEncumbrancies方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: notifyObjectRemoved
/**
* Is called when an object was removed
* @param object object that has been inserted
*/
int PlayerContainerComponent::notifyObjectRemoved(SceneObject* sceneObject, SceneObject* object, SceneObject* destination) const {
CreatureObject* creo = dynamic_cast<CreatureObject*>(sceneObject);
if (creo == NULL) {
return 0;
}
if (object->isArmorObject()) {
PlayerManager* playerManager = creo->getZoneServer()->getPlayerManager();
playerManager->removeEncumbrancies(creo, cast<ArmorObject*>(object));
}
if (object->isTangibleObject()) {
TangibleObject* tano = cast<TangibleObject*>(object);
tano->removeSkillModsFrom(creo);
}
if (object->isInstrument()) {
if (creo->isPlayingMusic())
creo->stopEntertaining();
}
//this it to update the equipment list
//we need a DeltaVector with all the slotted objects it seems
/*CreatureObjectMessage6* msg6 = new CreatureObjectMessage6(creo);
creo->broadcastMessage(msg6, true, true);*/
if (object->isTangibleObject() && object->getArrangementDescriptorSize() != 0 && object->getArrangementDescriptor(0)->size() != 0) {
const String& arrangement = object->getArrangementDescriptor(0)->get(0); //CHK
if (arrangement != "mission_bag" && arrangement != "ghost" && arrangement != "bank") {
creo->removeWearableObject(object->asTangibleObject(), true);
}
}
if (object->isTangibleObject()) {
ManagedReference<TangibleObject*> tano = object->asTangibleObject();
tano->removeTemplateSkillMods(creo);
}
// Jedi stuff below.
PlayerObject* ghost = creo->getPlayerObject();
if (ghost && ghost->isJedi()) {
if (object->isRobeObject()) {
ghost->recalculateForcePower();
}
}
return ContainerComponent::notifyObjectRemoved(sceneObject, object, destination);
}
示例2: notifyObjectRemoved
/**
* Is called when an object was removed
* @param object object that has been inserted
*/
int PlayerContainerComponent::notifyObjectRemoved(SceneObject* sceneObject, SceneObject* object, SceneObject* destination) {
CreatureObject* creo = dynamic_cast<CreatureObject*>(sceneObject);
if (object->isArmorObject()) {
PlayerManager* playerManager = creo->getZoneServer()->getPlayerManager();
playerManager->removeEncumbrancies(creo, cast<ArmorObject*>(object));
}
if (object->isTangibleObject()) {
TangibleObject* tano = cast<TangibleObject*>(object);
tano->removeSkillModsFrom(creo);
}
if (object->isInstrument()) {
if (creo->isPlayingMusic())
creo->stopEntertaining();
}
if (creo->getPlayerObject().get() != NULL && creo->getPlayerObject()->isJedi()) {
if ((object->isRobeObject() && cast<RobeObject*>( object)->getSkillRequired() != "") || (object->isWeaponObject() && cast<WeaponObject*>(object)->isJediWeapon()))
VisibilityManager::instance()->increaseVisibility(creo);
}
//this it to update the equipment list
//we need a DeltaVector with all the slotted objects it seems
/*CreatureObjectMessage6* msg6 = new CreatureObjectMessage6(creo);
creo->broadcastMessage(msg6, true, true);*/
if (object->isTangibleObject() && object->getArrangementDescriptorSize() != 0 && object->getArrangementDescriptor(0).size() != 0) {
String arrangement = object->getArrangementDescriptor(0).get(0); //CHK
if (arrangement != "mission_bag" && arrangement != "ghost" && arrangement != "bank") {
creo->removeWearableObject(cast<TangibleObject*>(object), true);
}
}
if (creo != NULL && object->isTangibleObject()) {
ManagedReference<TangibleObject*> tano = cast<TangibleObject*>(object);
tano->removeTemplateSkillMods(creo);
}
return ContainerComponent::notifyObjectRemoved(sceneObject, object, destination);
}