本文整理汇总了C++中Zone::getLocalPartyManager方法的典型用法代码示例。如果您正苦于以下问题:C++ Zone::getLocalPartyManager方法的具体用法?C++ Zone::getLocalPartyManager怎么用?C++ Zone::getLocalPartyManager使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zone
的用法示例。
在下文中一共展示了Zone::getLocalPartyManager方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
//.........这里部分代码省略.........
if (pWeapon == NULL || pWeapon->getItemClass() != Item::ITEM_CLASS_SWORD)
{
executeSkillFailException(pSlayer, getSkillType());
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " End" << endl;
return;
}*/
GCSkillToSelfOK1 _GCSkillToSelfOK1;
GCSkillToSelfOK2 _GCSkillToSelfOK2;
SkillType_t SkillType = pSkillSlot->getSkillType();
SkillInfo* pSkillInfo = g_pSkillInfoManager->getSkillInfo(SkillType);
SkillDomainType_t DomainType = pSkillInfo->getDomainType();
ZoneCoord_t X = pSlayer->getX();
ZoneCoord_t Y = pSlayer->getY();
int RequiredMP = (int)pSkillInfo->getConsumeMP();
bool bManaCheck = hasEnoughMana(pSlayer, RequiredMP) && pSlayer->getHP() > 100;
bool bTimeCheck = verifyRunTime(pSkillSlot);
bool bRangeCheck = checkZoneLevelToUseSkill(pSlayer);
bool bHitRoll = HitRoll::isSuccessMagic(pSlayer, pSkillInfo, pSkillSlot);
bool bEffected = pSlayer->isFlag(Effect::EFFECT_CLASS_HOLY_ARMOR);
if (bManaCheck && bTimeCheck && bRangeCheck && bHitRoll && !bEffected)
{
decreaseMana(pSlayer, RequiredMP, _GCSkillToSelfOK1);
pSlayer->setHP(pSlayer->getHP()-100);
_GCSkillToSelfOK1.addShortData(MODIFY_CURRENT_HP, pSlayer->getHP());
SkillInput input(pSlayer, pSkillSlot);
SkillOutput output;
computeOutput(input, output);
// 이펙트 클래스를 만들어 붙인다.
EffectHolyArmor* pEffect = new EffectHolyArmor(pSlayer);
pEffect->setDeadline(output.Duration);
pEffect->setDefBonus(output.Damage);
pSlayer->addEffect(pEffect);
pSlayer->setFlag(Effect::EFFECT_CLASS_HOLY_ARMOR);
// 이로 인하여 바뀌는 능력치를 보낸다.
SLAYER_RECORD prev;
pSlayer->getSlayerRecord(prev);
pSlayer->initAllStat();
pSlayer->sendRealWearingInfo();
pSlayer->sendModifyInfo(prev);
// 경험치를 올린다.
SkillGrade Grade = g_pSkillInfoManager->getGradeByDomainLevel(pSlayer->getSkillDomainLevel(DomainType));
Exp_t ExpUp = 10*(Grade+1);
shareAttrExp(pSlayer, ExpUp, 1, 1, 8, _GCSkillToSelfOK1);
increaseDomainExp(pSlayer, DomainType, pSkillInfo->getPoint(), _GCSkillToSelfOK1);
increaseSkillExp(pSlayer, DomainType, pSkillSlot, pSkillInfo, _GCSkillToSelfOK1);
// 패킷을 만들어 보낸다.
_GCSkillToSelfOK1.setSkillType(SkillType);
_GCSkillToSelfOK1.setCEffectID(CEffectID);
_GCSkillToSelfOK1.setDuration(output.Duration);
_GCSkillToSelfOK2.setObjectID(pSlayer->getObjectID());
_GCSkillToSelfOK2.setSkillType(SkillType);
_GCSkillToSelfOK2.setDuration(output.Duration);
GCAddEffect gcAddEffect;
gcAddEffect.setObjectID(pSlayer->getObjectID());
gcAddEffect.setEffectID(Effect::EFFECT_CLASS_HOLY_ARMOR);
gcAddEffect.setDuration(output.Duration);
pZone->broadcastPacket(X, Y, &gcAddEffect);
// Send Packet
pPlayer->sendPacket(&_GCSkillToSelfOK1);
pZone->broadcastPacket(X, Y, &_GCSkillToSelfOK2, pSlayer);
pSkillSlot->setRunTime(output.Delay);
uint PartyID = pSlayer->getPartyID();
if (PartyID != 0)
{
LocalPartyManager* pLPM = pZone->getLocalPartyManager();
pLPM->shareHolyArmor(PartyID, pSlayer, output.Damage, input.SkillLevel);
}
}
else
{
executeSkillFailNormal(pSlayer, getSkillType(), NULL);
}
}
catch (Throwable & t)
{
executeSkillFailException(pSlayer, getSkillType());
//cout << t.toString() << endl;
}
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " End" << endl;
__END_CATCH
}
示例2: execute
//////////////////////////////////////////////////////////////////////////////
// 슬레이어 셀프 핸들러
//////////////////////////////////////////////////////////////////////////////
void Expansion::execute(Slayer* pSlayer, SkillSlot* pSkillSlot, CEffectID_t CEffectID)
throw(Error)
{
__BEGIN_TRY
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " Begin" << endl;
Assert(pSlayer != NULL);
Assert(pSkillSlot != NULL);
try
{
Player* pPlayer = pSlayer->getPlayer();
Zone* pZone = pSlayer->getZone();
Assert(pPlayer != NULL);
Assert(pZone != NULL);
// 무장하고 있는 무기가 널이거나, 도가 아니라면 사용할 수 없다.
Item* pItem = pSlayer->getWearItem(Slayer::WEAR_RIGHTHAND);
if (pItem == NULL || pItem->getItemClass() != Item::ITEM_CLASS_SWORD)
{
executeSkillFailException(pSlayer, getSkillType());
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " End" << endl;
return;
}
bool bIncreaseDomainExp = pSlayer->isRealWearingEx(Slayer::WEAR_RIGHTHAND);
GCSkillToSelfOK1 _GCSkillToSelfOK1;
GCSkillToSelfOK2 _GCSkillToSelfOK2;
SkillType_t SkillType = pSkillSlot->getSkillType();
SkillInfo* pSkillInfo = g_pSkillInfoManager->getSkillInfo(SkillType);
SkillDomainType_t DomainType = pSkillInfo->getDomainType();
ZoneCoord_t X = pSlayer->getX();
ZoneCoord_t Y = pSlayer->getY();
int RequiredMP = (int)pSkillInfo->getConsumeMP();
bool bManaCheck = hasEnoughMana(pSlayer, RequiredMP);
bool bTimeCheck = verifyRunTime(pSkillSlot);
bool bRangeCheck = checkZoneLevelToUseSkill(pSlayer);
bool bHitRoll = HitRoll::isSuccessMagic(pSlayer, pSkillInfo, pSkillSlot);
bool bEffected = pSlayer->isFlag(Effect::EFFECT_CLASS_EXPANSION);
if (bManaCheck && bTimeCheck && bRangeCheck && bHitRoll && !bEffected)
{
decreaseMana(pSlayer, RequiredMP, _GCSkillToSelfOK1);
SkillInput input(pSlayer, pSkillSlot);
SkillOutput output;
computeOutput(input, output);
// 이펙트 클래스를 만들어 붙인다.
EffectExpansion* pEffect = new EffectExpansion(pSlayer);
pEffect->setDeadline(output.Duration);
pEffect->setHPBonus(output.Damage);
pSlayer->addEffect(pEffect);
pSlayer->setFlag(Effect::EFFECT_CLASS_EXPANSION);
// 이펙트를 적용시킨다.
pEffect->affect(pSlayer);
// 경험치를 올린다.
SkillGrade Grade = g_pSkillInfoManager->getGradeByDomainLevel(pSlayer->getSkillDomainLevel(DomainType));
Exp_t ExpUp = 10*(Grade+1);
if (bIncreaseDomainExp )
{
shareAttrExp(pSlayer, ExpUp, 8, 1, 1, _GCSkillToSelfOK1);
increaseDomainExp(pSlayer, DomainType, pSkillInfo->getPoint(), _GCSkillToSelfOK1);
// increaseSkillExp(pSlayer, DomainType, pSkillSlot, pSkillInfo, _GCSkillToSelfOK1);
}
_GCSkillToSelfOK1.setSkillType(SkillType);
_GCSkillToSelfOK1.setCEffectID(CEffectID);
_GCSkillToSelfOK1.setDuration(output.Duration);
_GCSkillToSelfOK2.setObjectID(pSlayer->getObjectID());
_GCSkillToSelfOK2.setSkillType(SkillType);
_GCSkillToSelfOK2.setDuration(output.Duration);
pPlayer->sendPacket(&_GCSkillToSelfOK1);
pZone->broadcastPacket(X, Y, &_GCSkillToSelfOK2, pSlayer);
GCAddEffect gcAddEffect;
gcAddEffect.setObjectID(pSlayer->getObjectID());
gcAddEffect.setEffectID(Effect::EFFECT_CLASS_EXPANSION);
gcAddEffect.setDuration(output.Duration);
pZone->broadcastPacket(pSlayer->getX(), pSlayer->getY(), &gcAddEffect);
pSkillSlot->setRunTime(output.Delay);
uint PartyID = pSlayer->getPartyID();
if (PartyID != 0)
{
LocalPartyManager* pLPM = pZone->getLocalPartyManager();
//.........这里部分代码省略.........
示例3: execute
//////////////////////////////////////////////////////////////////////////////
// 슬레이어 셀프 핸들러
//////////////////////////////////////////////////////////////////////////////
void Revealer::execute(Slayer* pSlayer, SkillSlot* pSkillSlot, CEffectID_t CEffectID)
throw(Error)
{
__BEGIN_TRY
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " Begin" << endl;
Assert(pSlayer != NULL);
Assert(pSkillSlot != NULL);
try
{
Player* pPlayer = pSlayer->getPlayer();
Zone* pZone = pSlayer->getZone();
Assert(pPlayer != NULL);
Assert(pZone != NULL);
GCSkillToSelfOK1 _GCSkillToSelfOK1;
GCSkillToSelfOK2 _GCSkillToSelfOK2;
SkillType_t SkillType = pSkillSlot->getSkillType();
SkillInfo* pSkillInfo = g_pSkillInfoManager->getSkillInfo(SkillType);
SkillDomainType_t DomainType = pSkillInfo->getDomainType();
int RequiredMP = (int)pSkillInfo->getConsumeMP();
bool bManaCheck = hasEnoughMana(pSlayer, RequiredMP);
bool bTimeCheck = verifyRunTime(pSkillSlot);
bool bRangeCheck = checkZoneLevelToUseSkill(pSlayer);
bool bHitRoll = HitRoll::isSuccessMagic(pSlayer, pSkillInfo, pSkillSlot);
bool bEffected = pSlayer->isFlag(Effect::EFFECT_CLASS_REVEALER);
if (bManaCheck && bTimeCheck && bRangeCheck && bHitRoll && !bEffected)
{
decreaseMana(pSlayer, RequiredMP, _GCSkillToSelfOK1);
// 기술이 유지되는 시간은 숙련도에 따라서 달라진다.
SkillInput input(pSlayer, pSkillSlot);
SkillOutput output;
computeOutput(input, output);
// 이펙트 오브젝트를 생성해서 붙인다.
EffectRevealer* pEffectRevealer = new EffectRevealer (pSlayer);
pEffectRevealer->setSkillLevel(pSkillSlot->getExpLevel());
pEffectRevealer->setDeadline(output.Duration);
pSlayer->addEffect(pEffectRevealer);
pSlayer->setFlag(Effect::EFFECT_CLASS_REVEALER);
// 이 이펙트가 붙음으로써, 안 보이던 것이 보인다.
pZone->updateMineScan(pSlayer);
//pZone->updateInvisibleScan(pSlayer);
pZone->updateHiddenScan(pSlayer);
// 경험치를 올린다.
SkillGrade Grade = g_pSkillInfoManager->getGradeByDomainLevel(pSlayer->getSkillDomainLevel(DomainType));
Exp_t ExpUp = 10* (Grade + 1)* 2;
shareAttrExp(pSlayer, ExpUp, 1, 8, 1, _GCSkillToSelfOK1);
increaseDomainExp(pSlayer, DomainType, pSkillInfo->getPoint(), _GCSkillToSelfOK1);
// increaseSkillExp(pSlayer, DomainType, pSkillSlot, pSkillInfo, _GCSkillToSelfOK1);
_GCSkillToSelfOK1.setSkillType(SkillType);
_GCSkillToSelfOK1.setCEffectID(CEffectID);
_GCSkillToSelfOK1.setDuration(output.Duration);
_GCSkillToSelfOK2.setObjectID(pSlayer->getObjectID());
_GCSkillToSelfOK2.setSkillType(SkillType);
_GCSkillToSelfOK2.setDuration(output.Duration);
pPlayer->sendPacket(&_GCSkillToSelfOK1);
pZone->broadcastPacket(pSlayer->getX(), pSlayer->getY(), &_GCSkillToSelfOK2, pSlayer);
// 이펙트가 붙었다고 알려준다.
GCAddEffect gcAddEffect;
gcAddEffect.setObjectID(pSlayer->getObjectID());
gcAddEffect.setEffectID(Effect::EFFECT_CLASS_REVEALER);
gcAddEffect.setDuration(output.Duration);
pZone->broadcastPacket(pSlayer->getX(), pSlayer->getY(), &gcAddEffect);
pSkillSlot->setRunTime(output.Delay);
uint PartyID = pSlayer->getPartyID();
if (PartyID != 0)
{
LocalPartyManager* pLPM = pZone->getLocalPartyManager();
pLPM->shareRevealer(PartyID, pSlayer, output.Duration);
}
}
else
{
executeSkillFailNormal(pSlayer, getSkillType(), NULL);
}
}
catch(Throwable & t)
{
executeSkillFailException(pSlayer, getSkillType());
}
//.........这里部分代码省略.........
示例4: execute
//////////////////////////////////////////////////////////////////////////////
// 슬레이어 오브젝트 핸들러
//////////////////////////////////////////////////////////////////////////////
void Restore::execute(Slayer* pSlayer, ObjectID_t TargetObjectID, SkillSlot* pSkillSlot, CEffectID_t CEffectID)
throw(Error)
{
__BEGIN_TRY
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " Begin" << endl;
Assert(pSlayer != NULL);
Assert(pSkillSlot != NULL);
try
{
Player* pPlayer = pSlayer->getPlayer();
Zone* pZone = pSlayer->getZone();
Assert(pPlayer != NULL);
Assert(pZone != NULL);
Creature* pFromCreature = pZone->getCreature(TargetObjectID);
// 뱀파이어만 건드릴 수가 있다.
// NoSuch제거. by sigi. 2002.5.2
if (pFromCreature==NULL
|| !pFromCreature->isVampire())
{
executeSkillFailException(pSlayer, getSkillType());
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " End" << endl;
return;
}
GCSkillToObjectOK1 _GCSkillToObjectOK1; // 스킬 쓴 넘에게...
GCMorph1 _GCMorph1; // 변신 당사자에게..
GCMorphSlayer2 _GCMorphSlayer2; // 변신 구경꾼들에게..
SkillType_t SkillType = pSkillSlot->getSkillType();
SkillInfo* pSkillInfo = g_pSkillInfoManager->getSkillInfo(SkillType);
bool bRangeCheck = verifyDistance(pSlayer, pFromCreature, pSkillInfo->getRange());
bool bHitRoll = true;
if (bRangeCheck && bHitRoll)
{
dropRelicToZone(pFromCreature);
dropFlagToZone(pFromCreature);
//////////////////////////////////////////////////////////////////////
// 각종 존 레벨 정보를 삭제해야 한다.
//////////////////////////////////////////////////////////////////////
// 파티 초대 중이라면 정보를 삭제해 준다.
PartyInviteInfoManager* pPIIM = pZone->getPartyInviteInfoManager();
Assert(pPIIM != NULL);
pPIIM->cancelInvite(pFromCreature);
// 파티 관련 정보를 삭제해 준다.
int PartyID = pFromCreature->getPartyID();
if (PartyID != 0)
{
// 먼저 로컬에서 삭제하고...
LocalPartyManager* pLPM = pZone->getLocalPartyManager();
Assert(pLPM != NULL);
pLPM->deletePartyMember(PartyID, pFromCreature);
// 글로벌에서도 삭제해 준다.
deleteAllPartyInfo(pFromCreature);
}
// 트레이드 중이었다면 트레이드 관련 정보를 삭제해준다.
TradeManager* pTM = pZone->getTradeManager();
Assert(pTM != NULL);
pTM->cancelTrade(pFromCreature);
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
Slayer* pNewSlayer = new Slayer;
Vampire* pVampire = dynamic_cast<Vampire*>(pFromCreature);
// DB에서 혹시 남아있을 지 모르는 흡혈 정보를 삭제해준다.
Statement* pStmt = NULL;
BEGIN_DB
{
pStmt = g_pDatabaseManager->getConnection("DARKEDEN")->createStatement();
StringStream sql;
sql << "DELETE FROM EffectBloodDrain WHERE OwnerID = '" + pFromCreature->getName() + "'";
pStmt->executeQuery(sql.toString());
SAFE_DELETE(pStmt);
}
END_DB(pStmt)
pNewSlayer->setName(pFromCreature->getName());
// 크리쳐 안의 플레이어 포인터와 플레이어 안의 크리쳐 포인터를 갱신한다.
Player* pFromPlayer = pFromCreature->getPlayer();
pNewSlayer->setPlayer(pFromPlayer);
GamePlayer* pFromGamePlayer = dynamic_cast<GamePlayer*>(pFromPlayer);
pFromGamePlayer->setCreature(pNewSlayer);
//.........这里部分代码省略.........
示例5: execute
//////////////////////////////////////////////////////////////////////////////
// 슬레이어 오브젝트 핸들러
//////////////////////////////////////////////////////////////////////////////
void Restore::execute(Slayer* pSlayer, ObjectID_t TargetObjectID, SkillSlot* pSkillSlot, CEffectID_t CEffectID)
throw(Error)
{
__BEGIN_TRY
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " Begin" << endl;
//cout << "Restore2 Start" << endl;
Assert(pSlayer != NULL);
Assert(pSkillSlot != NULL);
try
{
Player* pPlayer = pSlayer->getPlayer();
Zone* pZone = pSlayer->getZone();
Assert(pPlayer != NULL);
Assert(pZone != NULL);
Creature* pFromCreature = pZone->getCreature(TargetObjectID);
// 뱀파이어만 건드릴 수가 있다.
// NoSuch제거. by sigi. 2002.5.2
if (pFromCreature==NULL
|| !pFromCreature->isVampire())
{
executeSkillFailException(pSlayer, getSkillType());
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " End" << endl;
return;
}
GCSkillToObjectOK1 _GCSkillToObjectOK1; // 스킬 쓴 넘에게...
GCMorph1 _GCMorph1; // 변신 당사자에게..
GCMorphSlayer2 _GCMorphSlayer2; // 변신 구경꾼들에게..
SkillType_t SkillType = pSkillSlot->getSkillType();
SkillInfo* pSkillInfo = g_pSkillInfoManager->getSkillInfo(SkillType);
bool bRangeCheck = verifyDistance(pSlayer, pFromCreature, pSkillInfo->getRange());
bool bHitRoll = true;
if (bRangeCheck && bHitRoll)
{
//////////////////////////////////////////////////////////////////////
// 각종 존 레벨 정보를 삭제해야 한다.
//////////////////////////////////////////////////////////////////////
// 파티 초대 중이라면 정보를 삭제해 준다.
PartyInviteInfoManager* pPIIM = pZone->getPartyInviteInfoManager();
Assert(pPIIM != NULL);
pPIIM->cancelInvite(pFromCreature);
// 파티 관련 정보를 삭제해 준다.
int PartyID = pFromCreature->getPartyID();
if (PartyID != 0)
{
// 먼저 로컬에서 삭제하고...
LocalPartyManager* pLPM = pZone->getLocalPartyManager();
Assert(pLPM != NULL);
pLPM->deletePartyMember(PartyID, pFromCreature);
// 글로벌에서도 삭제해 준다.
deleteAllPartyInfo(pFromCreature);
}
// 트레이드 중이었다면 트레이드 관련 정보를 삭제해준다.
TradeManager* pTM = pZone->getTradeManager();
Assert(pTM != NULL);
pTM->cancelTrade(pFromCreature);
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
Slayer* pNewSlayer = new Slayer;
Vampire* pVampire = dynamic_cast<Vampire*>(pFromCreature);
// DB에서 혹시 남아있을 지 모르는 흡혈 정보를 삭제해준다.
Statement* pStmt = NULL;
BEGIN_DB
{
pStmt = g_pDatabaseManager->getConnection("DARKEDEN")->createStatement();
StringStream sql;
sql << "DELETE FROM EffectBloodDrain WHERE OwnerID = '" + pFromCreature->getName() + "'";
pStmt->executeQuery(sql.toString());
SAFE_DELETE(pStmt);
}
END_DB(pStmt)
pNewSlayer->setName(pFromCreature->getName());
// 크리쳐 안의 플레이어 포인터와 플레이어 안의 크리쳐 포인터를 갱신한다.
Player* pFromPlayer = pFromCreature->getPlayer();
pNewSlayer->setPlayer(pFromPlayer);
GamePlayer* pFromGamePlayer = dynamic_cast<GamePlayer*>(pFromPlayer);
pFromGamePlayer->setCreature(pNewSlayer);
pNewSlayer->setZone(pZone);
pNewSlayer->load();
//.........这里部分代码省略.........
示例6: activate
void EventMorph::activate ()
throw(Error)
{
__BEGIN_TRY
__BEGIN_DEBUG
Assert(m_pGamePlayer != NULL);
Creature* pFromCreature = m_pGamePlayer->getCreature();
Assert(pFromCreature->isSlayer());
if (m_pGamePlayer->getPlayerStatus() != GPS_NORMAL)
{
// 플레이어의 상태가 WAITING_FOR_CG_READY인데, morph가
// activate되어 밑의 존에서 크리쳐를 지우는 부분에서 에러가 throw되어
// 서버가 죽는 버그가 있었다. 정확히 어떻게 해서 CG_READY상태에서
// 이벤트가 activate되는지는 모르겠으나, GamePlayer의
// EventManager 자체를 GPS_NORMAL일 때만 돌아가게 하면,
// Resurrect가 되지 않으니 주의하길 바란다. 결국 GamePlayer 내부에서
// 체크를 하기가 곤란하기 때문에 이 부분에서, 처리한다.
StringStream msg;
msg << "EventMorph::activate() : GamePlayer의 상태가 GPS_NORMAL이 아닙니다."
<< "PlayerID[" << m_pGamePlayer->getID() << "]"
<< "CreatureName[" << pFromCreature->getName() << "]";
filelog("EventMorphError.log", "%s", msg.toString().c_str());
return;
}
pFromCreature->removeFlag(Effect::EFFECT_CLASS_BLOOD_DRAIN);
Zone* pZone = pFromCreature->getZone();
// 만일 Restore 이펙트가 걸려있다면 변신이 되지 않는다.
if (pFromCreature->isFlag(Effect::EFFECT_CLASS_RESTORE))
{
return;
}
dropRelicToZone(pFromCreature);
dropFlagToZone(pFromCreature);
dropSweeperToZone(pFromCreature);
//////////////////////////////////////////////////////////////////////
// 각종 존 레벨 정보를 삭제해야 한다.
//////////////////////////////////////////////////////////////////////
// 파티 초대 중이라면 정보를 삭제해 준다.
PartyInviteInfoManager* pPIIM = pZone->getPartyInviteInfoManager();
Assert(pPIIM != NULL);
pPIIM->cancelInvite(pFromCreature);
// 파티 관련 정보를 삭제해 준다.
uint PartyID = pFromCreature->getPartyID();
if (PartyID != 0)
{
// 먼저 로컬에서 삭제하고...
LocalPartyManager* pLPM = pZone->getLocalPartyManager();
Assert(pLPM != NULL);
pLPM->deletePartyMember(PartyID, pFromCreature);
// 글로벌에서도 삭제해 준다.
deleteAllPartyInfo(pFromCreature);
}
// 트레이드 중이었다면 트레이드 관련 정보를 삭제해준다.
TradeManager* pTM = pZone->getTradeManager();
Assert(pTM != NULL);
pTM->cancelTrade(pFromCreature);
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
Vampire* pVampire = new Vampire();
GCMorph1 gcEventMorph1; // 변신 당사자에게..
GCMorphVampire2 gcEventMorphVampire2; // 변신 구경꾼들에게..
pVampire->setName(pFromCreature->getName());
ObjectID_t fromObjectID = pFromCreature->getObjectID();
pVampire->setObjectID(fromObjectID);
Player* pPlayer = pFromCreature->getPlayer();
dynamic_cast<GamePlayer*>(pPlayer)->setCreature(pVampire);
pVampire->setPlayer(pPlayer);
pVampire->setZone(pZone);
pVampire->load();
Coord_t x = pFromCreature->getX(), y = pFromCreature->getY();
Dir_t dir = pFromCreature->getDir();
pVampire->setXYDir(x, y, dir);
pVampire->setMoveMode(pFromCreature->getMoveMode());
// slayer to vampire
Slayer* pSlayer = dynamic_cast<Slayer*>(pFromCreature);
// 뱀파이어로 변신할때 Creature Pointer가 달라지므로...
// 원래 등록 되어있던 포인터는 개가 된다...
// 따라서 새로운 Creature Pointer를 등록해줘야 한다.
g_pPCFinder->deleteCreature(pFromCreature->getName());
//.........这里部分代码省略.........