diff --git a/docs/REVISIONS-56-SERIES.TXT b/docs/REVISIONS-56-SERIES.TXT index 167cf738d..6d4d68656 100644 --- a/docs/REVISIONS-56-SERIES.TXT +++ b/docs/REVISIONS-56-SERIES.TXT @@ -390,4 +390,7 @@ Fixed: Client encryption not being decrypted correctly on login process. 30-01-2017, Coruja Fixed: HS/TOL items not showing correctly on client screen. Fixed: ML/SA/HS/TOL doors not working correctly. -[sphere.ini]: Fixed wrong SpeedScaleFactor default value and changed NPCNoFameTitle to be enabled by default \ No newline at end of file +[sphere.ini]: Fixed wrong SpeedScaleFactor default value and changed NPCNoFameTitle to be enabled by default + +07-02-2017, Coruja +Fixed: Char flag 'statf_hovering' (gargoyle fly ability) not clearing when gargoyle chars polymorph into non-gargoyle char ID. \ No newline at end of file diff --git a/src/graysvr/CChar.cpp b/src/graysvr/CChar.cpp index dd0e7eccf..2d2ce3120 100644 --- a/src/graysvr/CChar.cpp +++ b/src/graysvr/CChar.cpp @@ -1160,15 +1160,15 @@ void CChar::SetID( CREID_TYPE id ) { ADDTOCALLSTACK("CChar::SetID"); - CCharBase * pCharDef = CCharBase::FindCharBase(id); - if ( pCharDef == NULL ) + CCharBase *pCharDef = CCharBase::FindCharBase(id); + if ( !pCharDef ) { - if ( id != -1 && id != CREID_INVALID ) - DEBUG_ERR(("Create Invalid Char 0%x\n", id)); + if ( (id != -1) && (id != CREID_INVALID) ) + DEBUG_ERR(("Creating invalid chardef 0%x\n", id)); id = static_cast(g_Cfg.ResourceGetIndexType(RES_CHARDEF, "DEFAULTCHAR")); - if ( id < 0 ) - id = CREID_OGRE; + if ( id <= CREID_INVALID ) + id = CREID_MAN; pCharDef = CCharBase::FindCharBase(id); } @@ -1180,10 +1180,13 @@ void CChar::SetID( CREID_TYPE id ) if ( m_prev_id == CREID_INVALID ) m_prev_id = GetID(); - if ( !IsMountCapable() ) // new body may not be capable of riding mounts + if ( !IsMountCapable() ) // new body may not be capable of ride mounts Horse_UnMount(); - if ( !pCharDef->Can(CAN_C_EQUIP) ) // new body may not be capable of equipping items (except maybe on hands) + if ( !IsGargoyle() ) // new body may not be capable of use gargoyle fly ability + StatFlag_Clear(STATF_Hovering); + + if ( !pCharDef->Can(CAN_C_EQUIP) ) // new body may not be capable of equip items (except maybe on hands) { UnEquipAllItems(NULL, pCharDef->Can(CAN_C_USEHANDS)); }