Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int __thiscall CSkillSlot::AddAffectSkill(CSkillSlot *this, _tagAffectSkill *pAffectedSkill)
- {
- void *v3; // eax@57
- void *v4; // [sp+8h] [bp-B4h]@57
- signed int v5; // [sp+Ch] [bp-B0h]@1
- CSkillSlot *thisa; // [sp+10h] [bp-ACh]@1
- char v7; // [sp+84h] [bp-38h]@59
- unsigned __int16 v8; // [sp+8Ch] [bp-30h]@59
- int v9; // [sp+90h] [bp-2Ch]@59
- std::pair<unsigned int const ,SiegeBuildingInfomation *> _Val; // [sp+94h] [bp-28h]@59
- void *v11; // [sp+9Ch] [bp-20h]@56
- void *p; // [sp+A0h] [bp-1Ch]@55
- std::_Tree<std::_Tmap_traits<enum eCASTLE_TYPE,SiegeCastleInfomationManager *,std::less<enum eCASTLE_TYPE>,std::allocator<std::pair<enum eCASTLE_TYPE const ,SiegeCastleInfomationManager *> >,0> >::iterator result; // [sp+A4h] [bp-18h]@51
- std::_Tree_nod<std::_Tmap_traits<unsigned long,_tagAffectSkill *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,_tagAffectSkill *> >,0> >::_Node *v14; // [sp+A8h] [bp-14h]@49
- unsigned int _Keyval; // [sp+ACh] [bp-10h]@49
- std::_Tree<std::_Tmap_traits<enum eCASTLE_TYPE,SiegeCastleInfomationManager *,std::less<enum eCASTLE_TYPE>,std::allocator<std::pair<enum eCASTLE_TYPE const ,SiegeCastleInfomationManager *> >,0> >::iterator iter; // [sp+B0h] [bp-Ch]@49
- int bRet; // [sp+B4h] [bp-8h]@49
- int pAS; // [sp+B8h] [bp-4h]@49
- thisa = this;
- v5 = pAffectedSkill->nKind;
- if ( v5 > 4129 )
- {
- if ( v5 > 32787 )
- {
- if ( v5 <= 32978 )
- {
- if ( v5 != 32978 )
- {
- switch ( v5 )
- {
- case 32820:
- case 32821:
- case 32822:
- case 32823:
- case 32824:
- case 32825:
- case 32826:
- case 32827:
- case 32828:
- case 32829:
- case 32830:
- case 32831:
- case 32832:
- case 32833:
- case 32834:
- case 32835:
- case 32836:
- case 32837:
- case 32838:
- case 32839:
- case 32840:
- case 32841:
- case 32842:
- case 32843:
- case 32844:
- case 32845:
- case 32846:
- case 32847:
- case 32848:
- case 32849:
- case 32850:
- case 32851:
- case 32852:
- case 32853:
- case 32854:
- case 32855:
- case 32856:
- case 32857:
- case 32858:
- case 32859:
- case 32860:
- case 32861:
- case 32862:
- case 32863:
- case 32864:
- case 32937:
- case 32938:
- case 32939:
- case 32940:
- case 32941:
- case 32942:
- case 32943:
- case 32944:
- case 32945:
- case 32972:
- goto $L57653;
- default:
- goto LABEL_49;
- }
- goto LABEL_49;
- }
- goto $L57653;
- }
- if ( v5 > 36933 )
- {
- if ( v5 == 40965 )
- goto $L57653;
- }
- else
- {
- if ( v5 == 36933 || v5 >= 32983 && v5 <= 32984 )
- goto $L57653;
- }
- }
- else
- {
- if ( v5 == 32787 )
- goto $L57653;
- if ( v5 > 16430 )
- {
- if ( v5 == 32772 || v5 == 32780 || v5 == 32785 )
- goto $L57653;
- }
- else
- {
- if ( v5 == 16430 )
- goto $L57653;
- if ( v5 > 16412 )
- {
- if ( v5 == 16415 )
- goto $L57653;
- }
- else
- {
- if ( v5 >= 16411 || v5 == 4148 || v5 == 4150 )
- goto $L57653;
- }
- }
- }
- }
- else
- {
- if ( v5 == 4129 )
- goto $L57653;
- if ( v5 <= 544 )
- {
- if ( v5 < 543 )
- {
- switch ( v5 )
- {
- case 130:
- case 133:
- case 177:
- case 178:
- case 197:
- case 259:
- case 275:
- case 306:
- case 308:
- goto $L57653;
- default:
- goto LABEL_49;
- }
- goto LABEL_49;
- }
- $L57653:
- if ( CSkillSlot::IsAffectSkill(this, 0xC1u)
- || CSkillSlot::IsAffectSkill(thisa, 0x454u)
- || CSkillSlot::IsAffectSkill(thisa, 0x835u)
- || CSkillSlot::IsAffectSkill(thisa, 0x1017u)
- || CSkillSlot::IsAffectSkill(thisa, 0x102Au) )
- return 0;
- goto LABEL_49;
- }
- if ( v5 > 1103 )
- {
- if ( v5 == 2093 || v5 == 2116 || v5 == 4105 )
- goto $L57653;
- }
- else
- {
- if ( v5 == 1103 || v5 == 1031 )
- goto $L57653;
- if ( v5 == 1056 )
- {
- if ( CSkillSlot::IsAffectSkill(this, 0x454u) )
- return 0;
- }
- else
- {
- if ( v5 == 1081 )
- goto $L57653;
- }
- }
- }
- LABEL_49:
- bRet = 1;
- pAS = 0;
- EnterCriticalSection(&thisa->m_lock.m_critical_section);
- _Keyval = pAffectedSkill->nKind;
- std::_Tree<std::_Tmap_traits<unsigned_long_CWorld___std::less<unsigned_long>_std::allocator<std::pair<unsigned_long_const_CWorld__>>_0>>::find(
- (std::_Tree<std::_Tmap_traits<unsigned int,QuestTemplate *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,QuestTemplate *> >,0> > *)&thisa->m_mapAffectedSkill,
- (std::_Tree<std::_Tmap_traits<unsigned int,QuestTemplate *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,QuestTemplate *> >,0> >::iterator *)&iter,
- &_Keyval);
- v14 = thisa->m_mapAffectedSkill.baseclass_0._Myhead;
- if ( (std::_Tree_nod<std::_Tmap_traits<unsigned long,_tagAffectSkill *,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,_tagAffectSkill *> >,0> >::_Node *)iter != v14 )
- {
- pAS = *(_DWORD *)(*(_DWORD *)&iter + 16);
- if ( *(_BYTE *)(pAS + 2) > pAffectedSkill->nLevel )
- bRet = 0;
- else
- std::_Tree<std::_Tmap_traits<unsigned_int_SoundRegionScript___std::less<unsigned_int>_std::allocator<std::pair<unsigned_int_const_SoundRegionScript__>>_0>>::erase(
- (std::_Tree<std::_Tmap_traits<enum eCASTLE_TYPE,SiegeCastleInfomationManager *,std::less<enum eCASTLE_TYPE>,std::allocator<std::pair<enum eCASTLE_TYPE const ,SiegeCastleInfomationManager *> >,0> > *)&thisa->m_mapAffectedSkill,
- &result,
- iter);
- }
- LeaveCriticalSection(&thisa->m_lock.m_critical_section);
- if ( bRet )
- {
- if ( pAS )
- {
- ((void (__thiscall *)(CSkillSlot *, signed int, int, _DWORD, _DWORD))thisa->baseclass_0.vfptr[11].OnSkillEvent)(
- thisa,
- 7,
- pAS,
- 0,
- 0);
- p = (void *)pAS;
- operator delete((void *)pAS);
- }
- v11 = operator new(0x20u);
- if ( v11 )
- {
- _tagAffectSkill::_tagAffectSkill((_tagAffectSkill *)v11);
- v4 = v3;
- }
- else
- {
- v4 = 0;
- }
- pAS = (int)v4;
- memcpy(v4, pAffectedSkill, 0x20u);
- EnterCriticalSection(&thisa->m_lock.m_critical_section);
- v8 = *(_WORD *)pAS;
- v9 = pAS;
- _Val.first = v8;
- _Val.second = (SiegeBuildingInfomation *)pAS;
- std::_Tree<std::_Tmap_traits<unsigned_int_SoundRegionScript___std::less<unsigned_int>_std::allocator<std::pair<unsigned_int_const_SoundRegionScript__>>_0>>::insert(
- (std::_Tree<std::_Tmap_traits<unsigned int,SiegeBuildingInfomation *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,SiegeBuildingInfomation *> >,0> > *)&thisa->m_mapAffectedSkill,
- (std::pair<std::_Tree<std::_Tmap_traits<unsigned int,SiegeBuildingInfomation *,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,SiegeBuildingInfomation *> >,0> >::iterator,bool> *)&v7,
- &_Val);
- LeaveCriticalSection(&thisa->m_lock.m_critical_section);
- }
- return bRet;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement