PageRenderTime 13ms CodeModel.GetById 7ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/TGame/TCommon/Gene/Status/GEInvisibility.cpp

http://awoe.googlecode.com/
C++ | 43 lines | 29 code | 7 blank | 7 comment | 1 complexity | 0be655646d3f2dae7c7a3a3e99e1c4d2 MD5 | raw file
 1///////////////////////////////////////////////////////////////////////////////////////////////////
 2// GEInvisibility.cpp
 3// 2010?1?20?
 4// Copyright ?2007, 2010, 8DWorld, Inc. All rights reserved.
 5//
 6// 
 7///////////////////////////////////////////////////////////////////////////////////////////////////
 8
 9
10
11#include "stdafx.h"
12#include "GEInvisibility.h"
13#include "Entity/EntityIf.h"
14#include "Combat/CombatSysIf.h"
15#include "Gene/GeneCreateDataIf.h"
16
17
18GEInvisibility::GEInvisibility() 
19{
20}
21bool
22GEInvisibility::onAttach()
23{
24	if (__super::onAttach())
25	{
26		m_wpHost->setVisible(400);
27		m_wpCombat->clrFlg(Combat::FIdx_CanBeTargeted);
28		return true;
29	}
30	else
31	{
32		return false;
33	}
34}
35
36bool
37GEInvisibility::onDetach()
38{
39	m_wpCombat->setFlg(Combat::FIdx_CanBeTargeted);
40	m_wpHost->setVisible(1000);
41
42	return __super::onDetach();
43}